Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
en:entwickler:how_to_make_your_plugin_translatable [2019/08/01 08:28]
fasse [Use language files within your plugin]
en:entwickler:how_to_make_your_plugin_translatable [2019/08/01 08:29] (current)
fasse [Use language files within your plugin]
Line 28: Line 28:
 Also in Plugins own language files can be integrated and accessed to existing Admidio language files. Access to the Admidio language files is done relatively easily over the already used syntax in Admidio itself. ​ Also in Plugins own language files can be integrated and accessed to existing Admidio language files. Access to the Admidio language files is done relatively easily over the already used syntax in Admidio itself. ​
 <code php>​$gL10n->​get('​SYS_ALL'​)</​code>​\\ <code php>​$gL10n->​get('​SYS_ALL'​)</​code>​\\
-If someone wants to use new unused texts in the plugin, so it must be created an own language file for the plugin. For this, a folder is created in the plugin folder **languages**,​ where then a newly language file is to be created ,example **de.xml**. The structure of this language file must match from the section **XML language file**. This new folder will be automatically loaded if you open Admidio in a new browser session. Now, using the familiar syntax texts from these language files of plugins are accessible. There is no special adaptation necessary. <code php>​$gL10n->​get('​PLG_LOGIN_ACTIVE_SINCE'​)</​code>​+If someone wants to use new unused texts in the plugin, so it must be created an own language file for the plugin. For this, a folder is created in the plugin folder **languages**,​ where then a newly language file is to be created ,example **de.xml**. The structure of this language file must match from the section **XML language file**. This new folder will be automatically loaded if you open Admidio in a new browser session. Now, using the familiar syntax texts from these language files of plugins are accessible. There is no special adaptation necessary. <code php>​$gL10n->​get('​PLG_MY_PLUGIN_HOUSE'​)</​code>​
  
 ==== Find translators for your language file ==== ==== Find translators for your language file ====
 Now that you have created a language file it's possible to translate these strings to several other languages. You can do that by yourself or search for people who will do this but it's also possible to add your file to the [[https://​www.transifex.com/​admidio/​admidio/​dashboard/​|Admidio Project]] at [[https://​www.transifex.com|Transifex]]. We have already people who translate Admidio into another language and maybe they could also translate the strings of your plugin. Now that you have created a language file it's possible to translate these strings to several other languages. You can do that by yourself or search for people who will do this but it's also possible to add your file to the [[https://​www.transifex.com/​admidio/​admidio/​dashboard/​|Admidio Project]] at [[https://​www.transifex.com|Transifex]]. We have already people who translate Admidio into another language and maybe they could also translate the strings of your plugin.
  • en/entwickler/how_to_make_your_plugin_translatable.txt
  • Last modified: 2019/08/01 08:29
  • by fasse