|
From: <ina...@wo...> - 2003-12-12 18:33:58
|
Once again,
getTranslationLanguages() is Site object's method for its internatl usage, =
while
traslation settings logic is a unified, kernel functionality in Digi. Any=20
module developer
should use DgUtil.getCurrSiteTransLangs() and=20
DgUtil.getCurrSiteUserLangs().
It does not matter if the module is dgMarket or some Tic Tac Toe.
Capisce?=20
Verstehen Sie?=20
Comprend?=20
=BFEntiende?=20
Entenda?=20
(this is the part, Philip, where you say "si")
cheers
Irakli=20
Philipp Anokhin
12/12/2003 12:39 PM
34571 ISGIF
To: ina...@wo...
cc: dig...@li...,=20
dig...@li...
Subject: Re: [Digi-developer] Getting language settings for =
the current site
That's the correct use of the functions for dgMarket. We don't use=20
language inheritance.
Philipp.
ina...@wo...
Sent by: dig...@li...
12/12/2003 10:52 AM
=20
=20
To: dig...@li...
cc:=20
Subject: [Digi-developer] Getting language settings for the =
current site
FYI=20
It was noticed that some code is tryin to use:=20
DgUtil.getSiteDomain(request).getSite().getTranslationLanguages()=20
to get translation languages for the current site.=20
This is an incorrect approach. getTranslationLanguages returns the=20
settings=20
in the database (Site is a hibernate-persisted class) and does not take=20
into=20
account language-setting inheritance that should be in place by the=20
translation=20
specifications.=20
The method to be used instead is: DgUtil.getCurrSiteTransLangs()=20
The usage of incorrect method was noticed, for example in:=20
org.digijava.kernel.translator.action.TranslatorNavigation=20
org.digijava.module.eproc.action.NavigationListAction=20
getTranslationLanguages() in Site will not be set to deprecated because it =
has=20
its own meaning, but all the code trying to get Translator languages=20
should use=20
getCurrSiteTransLangs()=20
The same is true for user languages DgUtil.getCurrSiteUserLangs() should=20
be used.=20
thank you=20
Irakli=20
|