|
From: <pan...@wo...> - 2003-12-12 17:40:23
|
That's the correct use of the functions for dgMarket. We don't use language inheritance. Philipp. |---------+------------------------------------------> | | ina...@wo... | | | Sent by: | | | dig...@li...| | | ceforge.net | | | | | | | | | 12/12/2003 10:52 AM | | | | | | | | | | |---------+------------------------------------------> >-----------------------------------------------------------------------------------------------------------------------------| | | | To: dig...@li... | | cc: | | Subject: [Digi-developer] Getting language settings for the current site | | | >-----------------------------------------------------------------------------------------------------------------------------| FYI It was noticed that some code is tryin to use: DgUtil.getSiteDomain(request).getSite().getTranslationLanguages() to get translation languages for the current site. This is an incorrect approach. getTranslationLanguages returns the settings in the database (Site is a hibernate-persisted class) and does not take into account language-setting inheritance that should be in place by the translation specifications. The method to be used instead is: DgUtil.getCurrSiteTransLangs() The usage of incorrect method was noticed, for example in: org.digijava.kernel.translator.action.TranslatorNavigation org.digijava.module.eproc.action.NavigationListAction getTranslationLanguages() in Site will not be set to deprecated because it has its own meaning, but all the code trying to get Translator languages should use getCurrSiteTransLangs() The same is true for user languages DgUtil.getCurrSiteUserLangs() should be used. thank you Irakli |