I'm relatively new to Bludit and was asked to write a simple plugin. Which in itself worked pretty good by looking at some other plugins. However I'm struggling with getting the admin panel labels for the plugins settings translated, even after googling around some time.
My understanding is, that I add the strings to the "languages/en.json" file and then access them in the plugin code. So if a "de.json" file was added, this can then include the translation of my labels. Lets add an minimal example.
languages/en.json
Code: Select all
{
"plugin-data":
{
"name": "Nane of the Plugin",
"description": "Some description"
},
"someVariableName": "The text that should be displayed"
}
Code: Select all
public function form()
{
global $L;
...
$html .= '<div>';
$html .= '<label>' . $L->get('someVariableName') . '</label>';
$html .= '</div>';
...
return $html;
}
Any pointer directing me to the solution of the problem would be highly appreciated.