To create a new translation pack (for osFaq v1.0 ST and above):
- Creating a new Translation pack:
- Copy the english translation folder in /faq/include/language/ and name your copy to your translations name.
- The installer/upgrader also has a translation folder in /faq/setup/inc/language/.
- Please use only standard ASCII characters for the folder names.
- See the existing translations in the language folders for examples.
- Goto the settings area, edit the language and select your new translation from the list (a log out is no longer required to see new languages for v1.0 ST and above).
- NOTE: The installer will ask the installee to choose a language when it starts.
- When editting a language file, make sure you are using a UTF-8 capable editor and make sure the file is saved as UTF-8. Otherwise any non-ascii characters will become corrupted.
- NOTES: There are a number of cost-free open-source editors available if you dont already have one. JEdit, Eclipse and Netbeans are all excellant editors, theres tons more. Naturally most commercial editors are also fine. I use a range of editors depending on what Im doing; both open source and commercial types.
osFaq v1.0 ST and above comes with a single SQL file in each translation folder at [/faq/include/language/...]
- The SQL translation file is for the osFaq settings page and contains the setting names and descriptions.
- When updating the SQL file there are some simple rules to follow:
- For the language column, enter that same name you used for the translation folder.
- Backslash single quotes that appear in your text.
- Do NOT use any ; characters in your text.
- Do NOT include SQL comments in the file.
- Before releasing a translation to the public, test the file in osFaq. If you encounter any errors you are unable to resolve you should also try testing the file in PhpMyAdmin (in a test database). If you are still having trouble, please let me know via the projects support area. You might find it easiest to edit the SQL file using PhpMyAdmin or some other SQL client software.
General notes for the SQL Translation file:
- osFaq will run through some validation checks before attempting to use an SQL translation file. If any errors are encountered while inserting an SQL translation file it will attempt to restore the previous version of the language if it was already installed.
- During the validation process osFaq will notify you if:
- There are any duplicated or missing entries in the file.
- Any of the entries have the wrong language name.
- The file isnt valid for osFaq.
- There are any SQL syntax errors.
- During the validation process osFaq will notify you if:
- If the language SQL is not included with a translation or not in the database, the system will fallback to english.
- To refresh the SQL entries for an installed language, upload the new SQL file to the appropriate language translation folder, go to osFaq settings, edit the language then click save without making any changes. That will cause osFaq to replace the existing translation in the DB with the new data.
- Multiple languages can reside in the database at once without conflicting.
If you would like to add anything to this document, please contact me via the projects area at Sourceforge
.
