| 1 | == MapGuide Translation files == |
| 2 | |
| 3 | The official releases of MapGuide Open Source only include English as the supported language |
| 4 | |
| 5 | You can translate MapGuide and its various components |
| 6 | |
| 7 | === Translating the MapGuide Server === |
| 8 | |
| 9 | MapGuide defines its localizable messages in the `mapguide_en.res` file. |
| 10 | |
| 11 | Translating these messages is a 2 step process: |
| 12 | 1. Open the above file, translate the messages to your desired langauge and save it as `mapguide_<your ISO 639-1 language code>.res` under `Server\Resources` and `Web\www\mapagent\Resources` of your MapGuide installation. For example, a french translation would be saved as `mapguide_fr.res` |
| 13 | 2. Open serverconfig.ini and webconfig.ini and change the `DefaultMessageLocale` property to `<your ISO 639-1 language code>`. For example to use your french translation, set `DefaultMessageLocale = fr` in serverconfig.ini and webconfig.ini |
| 14 | |
| 15 | A restart of the MapGuide Server and Web Tier (restart Apache or recycle MapGuide's IIS application pool) is required for these changes to kick in. |
| 16 | |
| 17 | '''Note:''' This will translate the exception messages that are thrown and logged by MapGuide. As such, it is recommended you don't translate this file especially if you require assistance on any MapGuide error messages on the mapguide-users mailing list (whose primary spoken/written language among most users is English) |
| 18 | |
| 19 | === Translating the AJAX Viewer === |
| 20 | |
| 21 | The AJAX viewer defines its localizable messages under the `Web\www\localized\en` file |
| 22 | |
| 23 | To translate the AJAX viewer to your language open this file, translate the strings within and save it as `Web\www\localized\<your ISO 639-1 language code>`. For example, a french translation would be saved as `Web\www\localized\fr` |
| 24 | |
| 25 | Additionally, make a copy of the `PoweredBy_en.gif` and `license_en.htm` files and save them as `PoweredBy_<your ISO 639-1 language code>.gif` and `license_<your ISO 639-1 language code>.htm` respectively. You may choose to translate the content of license_en.htm if required. |
| 26 | |
| 27 | Finally, copy the `Web\www\localized\help\en` directory to `Web\www\localized\help\<your ISO 639-1 language code>` and optionally translate the content within this directory |
| 28 | |
| 29 | A restart of the Web Tier (restart Apache or recycle MapGuide's IIS application pool) is generally required for your new translation to kick in. |
| 30 | |
| 31 | Including `LOCALE=<your ISO 639-1 language code>` in your AJAX viewer url will instruct the AJAX viewer to use the strings as defined in `Web\www\localized\<your ISO 639-1 language code>`. If you do not specify the LOCALE parameter, it will default to "en" wherever a locale is required |
| 32 | |
| 33 | '''Please Note:''' This will only translate the strings in the AJAX viewer. You will still have to translate the strings in the Web Layout you pass into it. Maestro includes [http://themapguyde.blogspot.com.au/2011/12/mapguide-maestro.html functionality] to assist in translating your Web Layout documents |
| 34 | |
| 35 | === Translating Fusion === |
| 36 | |
| 37 | The Fusion viewer defines its localizable messages under the following locations (for the default locale `en`) |
| 38 | |
| 39 | * `Web\www\fusion\text\en` |
| 40 | * `Web\www\fusion\text\en.json` |
| 41 | * `Web\www\fusion\lib\OpenLayers\Lang\en.js` |
| 42 | |
| 43 | To translate Fusion, you must provide translated versions of the above 3 files and save them in their respective locations using your ISO 639-1 language code for the file name. For example, if you translated Fusion to french you need to save your translations under: |
| 44 | |
| 45 | * `Web\www\fusion\text\fr` |
| 46 | * `Web\www\fusion\text\fr.json` |
| 47 | * `Web\www\fusion\lib\OpenLayers\Lang\fr.js` |
| 48 | |
| 49 | Including `locale=<your ISO 639-1 language code>` in your Fusion template viewer url will instruct the Fusion viewer to use the strings as defined in your translation files. If you do not specify the locale parameter, it will default to "en" wherever a locale is required. |
| 50 | |
| 51 | Like the AJAX viewer, a restart of the Web Tier (restart Apache or recycle MapGuide's IIS application pool) is generally required for your new translation files to kick in. |
| 52 | |
| 53 | '''Please Note:''' Like the AJAX viewer, this will only translate the strings in the Fusion viewer. You will still have to translate the strings in the Application Definition (Flexible Layout) that you pass into it. Maestro includes [http://themapguyde.blogspot.com.au/2011/12/mapguide-maestro.html functionality] to assist in translating your Application Definition documents |
| 54 | |
| 55 | === Available Translations === |
| 56 | |
| 57 | The following translations are available for download (Note to contributors: Please keep this table up-to-date): |
| 58 | |
| 59 | ||Language||Component(s)||MapGuide Version||Attachment|| |
| 60 | ||French||AJAX Viewer||2.4||ajax_viewer_fr (save as fr)|| |