Community
Participate
Working Groups
[Not sure what component the localization support belongs to, so filing it Pulsar - sorry if I am wrong] I enabled localization (http://help.eclipse.org/galileo/topic/org.eclipse.mtj.doc.user/html/gettingstarted/localization.html) which works fine under limitations. Basically, as long as the 'required' localisation exists, everything is fine. I'ld prefer to see 'fallback' support. What I mean, is that if a localized string does not exist, the default is used. I modified 'L10nResources.java' because the documentation only said not to touch the 'L10nConstants.java'. Unfortunately 'L10nResrouces.java' is rewritten too. What did I change? Basically, I changed the interface of ReadResources to include 'values'. Hence, 'values = readResources(reader)', became 'readResources(reader, values);'. Further, in 'setLocale', I added a protected call to 'this.loadResources(L10nResources.DEFAULT_LOCALE);' before the protected call to 'this.loadResources(this.locale);'. The result? The default locale gets loaded first. That locale should have all strings. Then, an attempt is made to load the 'local locale'. If it does not exist, no real harm is done, the default locale is fully in place. If it exists, then any string defined in the 'local locale' overrides the one from the 'default locale'. Please implement something similar.
The main problem is what happens when a key is not found is intrusive at the moment. We are fixing this with bug 301332. After the fix the missing keys will not throw exceptions or return null. But you will be able to spot them easily... *** This bug has been marked as a duplicate of bug 301332 ***