- How does multi-language work?
Currently we use language files to store all the static words that a user can see on web pages.
Every php code file has a corresponding language file for a certain language. And we named the language file 'lang_' plus the filename of the php code file. i.e. the language file of the php code file 'details.php' would be 'lang_details.php'.
We has some mechanism in php codes to read the exact language files of user's preferred language, and you shouldn't worry about that.
- What's in language files?
In a language file is an array of strings. These strings contain all the static words that a user can see on web pages. When we need to say some words on a php code file, we call for a string in the array. And the output of the php code file, that is what users see on the web pages, would show the value of the string.
Sounds dizzying? Well, you need not care about all these. All you gotta do is translate the values of the strings in the language files into another language.
Let's see an example:
The following is the content of the English language file 'lang_users.php', which works for the php code file 'users.php'.
If you wanna translate it into Simplified Chinese, all you need is edit the file into this:
See, in every line, the left part, that is before
=>, is the name of a string, which you shouldn't touch. All you need to is translate the right part, after
=>, which is the value of the string, into another language.
Sometimes you need to look at the corresponding web pages to get the context meaning of some words.
- Sounds easy? See what do you need to do.
If you feel like to help us,
CONTACT US and we will send you a pack of the English language files (or any other available language if you prefer). Received it, you can start translating the value of strings (which is in English), into another language. It should take you several hours to do the whole work. After this, send back the translated language files to us.
If no bugs or hacking codes are found in testing, we would put the new language into work.
Sometimes the language files need to be updated, typically adding new strings, when site codes are updated. If you feel like it, you can help maintain the language files.
-
IMPORTANT
The text of language files must be encoded in UTF-8. When saving files, be sure to set the character encoding to UTF-8. Otherwise mojibake may happen.