[mapguide-users] Fusion: How do I define taskPaneTitle, legendTitle, etc?

David Wilhelmsson david.wilhelmsson at 65nord.se
Wed Sep 26 01:45:42 PDT 2012


After a little more investigation, I noticed that fusion/text/*.json and
lib/OpenLayers/Lang/*.js were being compressed in
lib/fusionSF-compressed.js. I manually added my new fusion/text/[language
code].json and fusion/lib/OpenLayers/Lang/[language code].js to
fusion/templates/mapguide/[theme name]/index.html and everything worked. I
guess I could have also built my own fusionSF-compressed.js if I knew how

In summary, here's what I did to get my own language string:

1. Copy fusion/text/en.json -> fusion/text/[language code].json
2. Edited fusion/text/[language code].json line 1 ->
Fusion.Strings.[language code] = {
3. Translated the rest of fusion/text/[language code].json

4. Copy fusion/text/en -> fusion/text/[language code]
5. Translated fusion/text/[language code]

6. Copy fusion/lib/OpenLayers/Lang/en.js ->
fusion/lib/OpenLayers/Lang/[language code].js
7. Edited fusion/lib/OpenLayers/Lang/[language code].js line 15 ->
OpenLayers.Lang.[language code] = {
8. Translate the rest of fusion/lib/OpenLayers/Lang/[language code].js

(please note restarting the MapGuide Server service is not required for the
final solution)

9. Edited fusion/templates/mapguide/[theme name]/index.html and inserted the
following lines after the import of fusionSF-compressed.js (repeat for each
theme in use):


- or -

9. Rebuild fusionSF-compressed.js to include fusion/text/[language
code].json and fusion/lib/OpenLayers/Lang/[language code].js

10. Visit [fusion url]&locale=[language code] (please note I found that
"locale" is case sensitive in MapGuide 2.2) for your translated interface.

I'm not sure if I need to do anything further with fusion/text/[language
code].json, however the above steps work for me.

Hope this helps anyone else out!

Kind regards,

View this message in context: http://osgeo-org.1560.n6.nabble.com/Fusion-How-do-I-define-taskPaneTitle-legendTitle-etc-tp5004258p5004536.html
Sent from the MapGuide Users mailing list archive at Nabble.com.

More information about the mapguide-users mailing list