Translating Movian to other languages¶
Overview¶
Translations are stored in the /lang directory in Movian's root.
Content of the language file MUST be coded in UTF-8.
Recommended language file name is: xx_YY.lang For example: zh_CN.lang
Where xx is language code from https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
and YY is country code from https://en.wikipedia.org/?title=ISO_3166-1
The language files start with a few header lines:
language: Swedish native: Svenska maintainer: Andreas Öman <[email protected]>
- language - name of the language in English.
- native - language name in it's own language.
- maintainer - name and email of the author of the language file.
You need to look at every 'id' and write translated line to 'msg:'. Each entry MUST be on a single line (don't enter multiple lines). To insert line breaks, use '\n'.
Plural forms¶
msg[0]: this is the plural form msg[1]: this is the singular form
Example:
id: Played %d times msg[0]: Played %d times msg[1]: Played %d time
Creating translation for your language¶
Just download any existing translation file you like from https://github.com/andoma/showtime/tree/master/lang
For example: https://raw.githubusercontent.com/andoma/showtime/master/lang/sv_SV.lang
Just rename the file and start editing. After you finished, test and submit translation.
Testing translation¶
Your *.lang file can be directly uploaded to your running Movian by using built-in web server. Open http://x.x.x.x:42000 (where x.x.x.x is IP address of the device where your Movian is running) and upload the translation file by using the browser.
The uploaded language will take effect immediately.
Submitting translation¶
To include your translation into the official app, you can use any of these ways:
a) Post a message and attach translation file in the Translations forum
b) Create a pull request to https://github.com/andoma/showtime