Gertjan, I didn't realise that we would want to support multiple language files in one application.
I would have thought that if I was developing an application for a specific language, then I would also be required to go through and update all messages for that language. However, if you have a need, then I'm happy for mapbuilder to provide the functionality. I assume that the config file should specify a language list: Ie, in your case: Language=nl-BE, nl, en Gertjan van Oosten wrote: > As discussed during the team meeting on 24th July: > > http://uwyn.com/drone/log/bevinbot/mapbuilder/20070724 > > I have been thinking about adding support for language subtags, with the > proper fallback. I have added a design proposal to the JIRA issue, text > included below. If anyone wishes to comment, please do so. > > http://jira.codehaus.org/browse/MAP-165 > > Gertjan van Oosten commented on MAP-165: > ---------------------------------------- > > We should add a mechanism for language subtags with fall-back on the > main language, e.g.: > > - nl-BE would contain messages specific to Flemish > - messages not specified in lib/text/nl-BE/widgetText.xml would fall > back on lib/text/nl/widgetText.xml > > A further fall-back from any language to the default language (en) would > be useful as well; any new messages that have not yet been translated > from the default language into the other supported languages would still > be shown, albeit in English, but that's still beter than nothing. > > The way messages are loaded in Config.js would then go something like > this: > > - load the messages for the default language > - load the messages for the main language of the given lang parameter > - if the lang parameter has a language subtag, load the messages for the > complete language tag > > Since the mbGetMessage() function always picks the last message it finds > for a specific key, this would make sure you would always get the most > specific message, with automatic fall-back. > > Adding the user widgetText to this slightly complicates things. To get > the right fallback scenario, it would have to go something like this: > > - load the mapbuilder messages for the default language > - load the user messages for the default language > - load the mapbuilder messages for the main language of the given lang > parameter > - if the lang parameter has a language subtag, load the mapbuilder > messages for the complete language tag > - load the user messages for the main language of the given lang > parameter > - if the lang parameter has a language subtag, load the user messages > for the complete language tag > > That should do the trick. > > Regards, > -- Cameron Shorter Systems Architect, http://lisasoft.com.au Tel: +61 (0)2 8570 5050 Mob: +61 (0)419 142 254 ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ mapbuilder-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mapbuilder-devel
