Page 1 of 1

How to use AdminLanguagePack on Broadleaf 2.2.1

Posted: Mon Jul 08, 2013 11:57 am
by Soso
Hi,

I am using Braodleaf 2.2.1 and I would like to set up the admin language to French. I have downloaded the AdminLanguagePack and followed the tutorial provided, but the admin language is still in english.

Does this tutorial work with broadleaf 2.2.1, is there any other step I should do to make it work?

Thanks.

Re: How to use AdminLanguagePack on Broadleaf 2.2.1

Posted: Tue Jul 09, 2013 1:30 pm
by priyeshgpatel
Hi ,

It should work.
You would need to call the admin with the locale url parameter for french language like so:

localhost:8080/admin?locale=fr

Re: How to use AdminLanguagePack on Broadleaf 2.2.1

Posted: Wed Jul 10, 2013 3:39 am
by Soso
Hi,

the thing is that the translation works partially, some fields are translated whereas others are not, see the screenshot below:
Translation.jpg
Translation.jpg (34.33 KiB) Viewed 5044 times


Every field of a category, such as active date, are not translated, but others are translated, like text in the tab (Aucune donnée à afficher). I have checked keys in properties files and in java classes and they match, so I don't know why it doesn't work.

Thanks in advance.

Re: How to use AdminLanguagePack on Broadleaf 2.2.1

Posted: Fri Jul 12, 2013 3:45 am
by Soso
Hi,

it seems since broadleaf uses i18nConstants instead of ConstantsWithLooup for translation, only smart GWT components are translated, such as "No item to show/Aucune donnée à afficher" as you can see on my previous post.

By using eclipse debug mode, I have found that the french language is not used as the default language.

constants.jpg
constants.jpg (144.13 KiB) Viewed 5031 times


As you can see, the "default" language is still there. I 've tried to set up the language gwt property by using this line :
<meta name="gwt:property" content="locale=fr"/>
but it doesn't change a thing.

The problem might come from MessageManger class. It uses a map to match key/translation. So if a key is saved with a english translation, the same key with a french translation might not be taken in account.

constants.jpg
constants.jpg (144.13 KiB) Viewed 5031 times