Archived:Adding your own translation
hamishwillee
(Talk | contribs) |
|||
| (7 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
| + | {{Archived|The 'Mobile web server' was discontinued in February 2010. See [[:Category:Mobile Web Server#Mobile web server discontinued, as of February 2010|here]] for more information.}} | ||
| + | {{ArticleMetaData <!-- v1.2 --> | ||
| + | |sourcecode= <!-- Link to example source code e.g. [[Media:The Code Example ZIP.zip]] --> | ||
| + | |installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) --> | ||
| + | |devices= <!-- Devices tested against - e.g. ''devices=Nokia 6131 NFC, Nokia C7-00'') --> | ||
| + | |sdk= <!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Qt SDK 1.1.4]) --> | ||
| + | |platform= <!-- Compatible platforms - e.g. Symbian^1 and later, Qt 4.6 and later --> | ||
| + | |devicecompatability= <!-- Compatible devices e.g.: All* (must have internal GPS) --> | ||
| + | |dependencies= <!-- Any other/external dependencies e.g.: Google Maps Api v1.0 --> | ||
| + | |signing= <!-- Signing requirements - empty or one of: Self-Signed, DevCert, Manufacturer --> | ||
| + | |capabilities= <!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. --> | ||
| + | |keywords= <!-- APIs, classes and methods (e.g. QSystemScreenSaver, QList, CBase --> | ||
| + | |language= <!-- Language category code for non-English topics - e.g. Lang-Chinese --> | ||
| + | |translated-by= <!-- [[User:XXXX]] --> | ||
| + | |translated-from-title= <!-- Title only --> | ||
| + | |translated-from-id= <!-- Id of translated revision --> | ||
| + | |review-by= <!-- After re-review: [[User:username]] --> | ||
| + | |review-timestamp= <!-- After re-review: YYYYMMDD --> | ||
| + | |update-by= <!-- After significant update: [[User:username]]--> | ||
| + | |update-timestamp= <!-- After significant update: YYYYMMDD --> | ||
| + | |creationdate= 20080214 | ||
| + | |author= [[User:Jukkaekl]] | ||
| + | }} | ||
Here is how to translate MWS localization files into a new language. | Here is how to translate MWS localization files into a new language. | ||
| − | # Find out all the ''_loc.py'' files, there is one in ''/htdocs/Framework'' and one for each web application in ''/htdocs/Web_Applications''. Start by copying one of the file and edit your own translations to a new file. For to create Swedish localization, you need to create ''mws_framework_se_loc.py'' file in ''/htdocs/Framework'' and similarly a ''_se_loc.py'' file for each web application. | + | # Find out all the ''_loc.py'' files, there is one in ''/htdocs/Framework'' and one for each web application in ''/htdocs/Web_Applications''. Start by copying one of the file and edit your own translations to a new file. For example to create Swedish localization, you need to create ''mws_framework_se_loc.py'' file in ''/htdocs/Framework'' and similarly a ''_se_loc.py'' file for each web application. |
| − | # | + | # Edit file ''/htdocs/Framework/WebFrameworkConstants.py'': add your new language into two places (here Swedish is added) |
| + | ## SUPPORTED_LANGUAGES = ('en', 'fi', 'fr', 'de', 'it', 'es','se') | ||
| + | ## LANGUAGE_NAMES = {'en':'English', 'fi':'Finnish', 'fr':'French','de':'German', 'it':'Italian', 'es':'Spanish', 'se':'Swedish'} | ||
| + | # That's it! Now restart the server and you should see your new language available in Settings web page. | ||
| − | [[Category: | + | [[Category:Mobile Web Server]] |
Latest revision as of 09:29, 15 June 2012
Archived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.
The 'Mobile web server' was discontinued in February 2010. See here for more information.
The 'Mobile web server' was discontinued in February 2010. See here for more information.
Article Metadata
Here is how to translate MWS localization files into a new language.
- Find out all the _loc.py files, there is one in /htdocs/Framework and one for each web application in /htdocs/Web_Applications. Start by copying one of the file and edit your own translations to a new file. For example to create Swedish localization, you need to create mws_framework_se_loc.py file in /htdocs/Framework and similarly a _se_loc.py file for each web application.
- Edit file /htdocs/Framework/WebFrameworkConstants.py: add your new language into two places (here Swedish is added)
- SUPPORTED_LANGUAGES = ('en', 'fi', 'fr', 'de', 'it', 'es','se')
- LANGUAGE_NAMES = {'en':'English', 'fi':'Finnish', 'fr':'French','de':'German', 'it':'Italian', 'es':'Spanish', 'se':'Swedish'}
- That's it! Now restart the server and you should see your new language available in Settings web page.

