Sightly: set locale to 'pt-br' doesn't work. | Community
Skip to main content
lif66417554
Level 2
Apr 26, 2018 10:51 AM UTC

Sightly: set locale to 'pt-br' doesn't work.

If I set local to "de", "es", "fr", "it", "ja", I can use Sightly to get I18n value. But if I set local to "pt-br", "zh-cn", "zh-tw", "ko-kr", Sightly can't get I18n value.

For exemple:

${'Default Value' @ i18n, locale='es'}  is displaying "Valor predeterminado". It is displaying as expected.

${'Default Value' @ i18n, locale='pt-br'} is displaying "Default Value", but it should be displayed to "Valor padrão".

Does't anyone know how to fix it?

Thanks.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

lif66417554
Level 2
Jul 19, 2018 9:27 AM UTC

I am not sure why ${'Default Value' @ i18n, locale='pt-br'} doesn't work. I used another way fixed it.

I changed the language in the page properties and it is working. 

Translate
smacdonald2008
Level 10
Apr 26, 2018 12:00 PM UTC

See "Internationalization" in this doc topic -- HTL Expression Language

Translate
smacdonald2008
Level 10
Apr 26, 2018 12:02 PM UTC

Also - so this can be reproduced - please state all of the steps that you did here.

Translate
New Participant
Dec 31, 2018 5:36 PM UTC

Hi,

We met with the same issue which when we set the locale to 'zh-cn' or any language with '-', it displayed default value.

I found it maybe because ````Locale l = LocaleUtils.toLocale(locale);``` in I18NRuntimeExtension.java. The method 'toLocale' will throw an exception if we pass 'zh-CN' as parameter. Any ideas?

Translate