I'm starting to get a feeling, that I'm doing something wrong or ..? Even when I set the locale explicitly (in the code), and make sure, that I18nContentSupport.getLocale() returns the correct locale, the localization still doesn't work.
Is it that I'm doing something exceptional? In my view, localization is the most basic requirement of an application, isn't it? How are you guys doing it? I would be very thankful, if someone would guide me in magnolia code where to look for the potential cause of this problem? Cheers, Vytautas Vytautas C wrote: > Ok, this is clearly a bug either in DefaultI18nContentSupport, or in > other place: > > This support DefaultI18nContentSupport is called for each requested > resource, independetly of it's origin. > > So, the resource uri like > /stk-resources/site/resources/myProject/css/crealty.css is parsed for > locale, it blindly takes stk-resources, and creates the Locale object > out of it. > > Then at isLocaleSupported such a locale obviously fails, and it takes > the default locale, so english. > > Because the correct request uri is parsed in the first place, the > following uri's simply override the locale set. > > > I guess I should file a bug, so I'll do that I guess? > > Vytautas > > > Jan Haderka wrote: >> On Thu, 2009-09-17 at 18:16 +0300, Vytautas C(ivilis wrote: >>> Thank you for quick answer. >>> >>> The configuration attached. >>> I've tried de locale too. >>> >>> To make it clear, I use the url as such: >>> http://localhost:8080/magnoliaAuthor/magnoliaAuthor/de/myPage/.. >> double occurrence of "magnoliaAuthor" ... is that just a typo? If not >> then this would explain the issue at DefaultI18ContentSupport class >> looks for the lang code only at the first subfolder after the context >> path (i.e. after the first "magnoliaAuthor"). >> >> Other wise your configuration looks fine. You might want to try to >> attach debugger to the methods in DefaultI18ContentSupport to see if the >> translation is called at all and if it yields correct results and if so >> then where later it gets lost. >> >> Truth to say, I have used the STK i18n only in the EE so using the >> ETKI18nContentSupport instead of the default one, but I believe the >> default should work as well. >> >> Cheers, >> Jan >> >>> So, no country code. >>> >>> Vytautas >>> >>> >>> Jan Haderka wrote: >>>>> It looks like it doesn't react to url at all, but instead depends on >>>>> client locale? On the other hand, if I enter unsupported locale, e.g. >>>>> ru, then resource not found happens (correct behavior). >>>>> >>>> If that's the case I suspect it is more related to the i18n support >>>> configuration ... can you provide screenshot or export of what you have >>>> under config:/server/i18n/content and its children? >>>> >>>> Thanks, >>>> Jan >>>> >>>> >>>> ---------------------------------------------------------------- >>>> For list details see >>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>> To unsubscribe, E-mail to: <[email protected]> >>>> ---------------------------------------------------------------- >>>> >>>> >>> ---------------------------------------------------------------- >>> For list details see >>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>> To unsubscribe, E-mail to: <[email protected]> >>> ---------------------------------------------------------------- >> >> ---------------------------------------------------------------- >> For list details see >> http://www.magnolia-cms.com/home/community/mailing-lists.html >> To unsubscribe, E-mail to: <[email protected]> >> ---------------------------------------------------------------- >> >> > ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
