How to create translation
Nextend Accordion and Nextend Smart Slider 2 (when released) are fully translatable. It means that there is a simple way to translate the texts which appears(like configuration parameters, messages etc) in out projects. Out goal is to make our extensions and plugins as easy to use for those who can’t speak English as possible. In this project, we would like to ask for your help. It could be great if you could translate 40 or much more texts to your native language. You can sign up for this project on our contact form. We will give reward everyone who achieve significant progress in a language.
First, install the latest Nextend Accordion Menu. The translation features included from version 9.2.0.
Joomla → Administration → Extensions → Plug-in manager → Nextend Library → Configure → Enable Debug language → Save plugin settings
After the plugin configuration saved, the debug mode instantly start to work. You will see the top of the page the loaded language files. In my case the en_GB is the tag the language what my backend currently use.
End of the lines means that if the language file loaded or not. 1 means loaded, nothing means file not exists.
Example: your language tag is de_DE, the our framework will try to load the files from /languages/de_DE/***.ini, but when this file not exists, then it will fall back to the /languages/en_GB/***.ini. So if you log in to the backend with german language, it will show the following as there are no german translation:
So the process is simple, you just need to create the not loaded language file and copy the content of the original language file from languages/en_GB/ folder.
Example: You would like to translate /libraries/nextend/language/languages/en_GB/window.ini, you just simply need to create a /libraries/nextend/language/languages/de_DE/ folder and copy the original window.ini file into this new folder. Then you can start the translation in /libraries/nextend/language/languages/de_DE/window.ini file and you can check the result on your site.
Format of the .ini language files
NEXTEND_Now_you_should_save_the_module_settings_to_apply_changes = "Now you should save the module settings to apply changes!" NEXTEND_Manual = "Manual" NEXTEND_Support = "Support" NEXTEND_APPLY = "APPLY" NEXTEND_Not_found_xml_configuration = "Not found xml configuration: "
NEXTEND_Now_you_should_save_the_module_settings_to_apply_changes is the key and the value for this key is in the same row between the “”. You will only need to translate the texts between “” marks. For example(hu_HU is the tag of my native language – hungarian):
NEXTEND_Now_you_should_save_the_module_settings_to_apply_changes = "Mentsd el a modul beállításait" NEXTEND_Manual = "Használati útmutató" NEXTEND_Support = "Támogatás" NEXTEND_APPLY = "Mentés" NEXTEND_Not_found_xml_configuration = "Az XML konfigurációs fálj nem található: "
Things to know
Our framework is lazy-loading the language files, which means that only the currently required files are loaded. For example you will see different language files on the Nextend Framework plugin page and different in the Accordion Menu module configuration page. Also if you choose a new menu type our changing the menu theme a new language file will appear which related to the currently used settings.
You can’t edit the files with Windows Notepad as it can use wrong line break and can mess up special characters.
Tools, which can help to translate
- Ini Translation Utility – Windows, allows to open a source ini file and a target ini file and makes it easier to translate. Don’t forget to leave the “” around the translated texts.
- Notepad++ – Simple text editor, which will handle special character well and syntax highlighting the ini files with ftp support.
If you have more tools, which could help, please send us to update the list!