====== How to make your plugin translatable ====== ==== Create an xml file with your strings ==== Admidio uses for translations the [[https://developer.android.com/guide/topics/resources/string-resource.html|Android string resource]]. This is a very compact xml format that should contain every string you use in your plugin. The format looks like this: Your string Therefore each string contains a unique identifier. Use for your strings a prefix that belong to your plugin e.g. **PLG_MY_PLUGIN** and then a short text that refers to your string. So for example if you want an identifier for **House** then you got **PLG_MY_PLUGIN_HOUSE**. So your file may look like this: House Dog This is a very long text where it's not possible to get a good identifier. Now create a folder called **languages** within your plugin folder and save this file with the ISO code of the language that you have used in your plugin. The you will find the supported languages and their ISO codes within the folder **adm_program/languages/languages.xml**. :!: It's not possible to use a language within your plugin that is not supported by Admidio. You may now have the following file in your plugin folder //plugin_folder/languages/en.xml//. For more information about the language file itself have a look at [[en:entwickler:mehrsprachigkeit|this documentation]]. ==== Use language files within your plugin ==== 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. $gL10n->get('SYS_ALL')\\ 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. $gL10n->get('PLG_MY_PLUGIN_HOUSE') ==== 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.