TRANSLATION SUPPORT IN MedDream Any language can be enabled and/or added, even by the end user. There is no known limit neither in number of available languages nor in their combinations, though English should still be available to minimize misunderstandings if technical support from Softneta is needed. MedDream is shipped with a few translations. Their status at the time of this writing (2016-04-18): Lang. Completeness Enabled code by default? ---- ------------ ----------- de 70% · en 100% + es 17% · fi 66% · fr 67% · lt 100% + ru 98% + se 17% · Only the most completed translations are enabled by default. 1. ENABLING A LANGUAGE To *enable* a language, specify it in the parameter "$languages" (config.php). Example: $languages = "en,lt,ru"; It's a comma-separated list of language codes. The GUI will display the language choices in this order. The first language is chosen by default during the very first start of MedDream in a particular Web browser. Every language specified here must be *available*. This means that at least the file languages.xml does exist in the directory locales/. If this file is not found, MedDream shows an error message and doesn't load. An empty list ($languages = "";) is equivalent to the factory default of "en,lt,ru". Though it's not recommended, this default could be adjusted in authdb.php. 2. CORRECTING A TRANSLATION In the directory locales/, a few files are expected: languages.xml Strings for Flash GUI and backend. This file is mandatory, MedDream will not "see" a translation without it. This file _must_ be saved as UTF-8 with BOM (byte order mark). The latter helps MedDream to detect invalid encodings and warn about it. translation.json Strings for HTML GUI, including the login form. help.pdf Online help. Currently only the Flash GUI has a dedicated button for opening this file. NOTE: a relative path to this file, "locales//help.pdf", is also specified in languages.xml, languages > Main > helpURL. Most translations do not have their own help.pdf and simply link to the English one. 3. CREATING A TRANSLATION You can take any existing translation and make it over. However a dedicated template, locales/_customize_/*.*, might be more useful. Every string there starts with "*" to make incomplete translations more noticeable; as currently no string needs "*" by design, you can simply search for this character during the final check. languages.xml is special in the following way: 1) languages > language must contain the language code of this translation. If the code is different from the name of the directory containing the file, then MedDream will fall back to English. 2) do not forget to save it as UTF-8 with BOM. It is recommended to use a text editor that at least highlights XML and JSON syntax, to avoid gross errors and subsequent failure to load the file (or crashes etc). 4. AFTERWORD Softneta will be thankful for any remarks or improvements, especially from native speakers. Sharing your corrections will also ensure their availability in later releases of MedDream, especially if the format of translation files becomes totally different.