Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

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

Avatar

Avatar
Validate 1
Level 2
lif66417554
Level 2

Likes

4 likes

Total Posts

15 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
lif66417554
Level 2

Likes

4 likes

Total Posts

15 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
View profile
lif66417554
Level 2

26-04-2018

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".

1474019_pastedImage_4.png

Does't anyone know how to fix it?

Thanks.

Replies

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

26-04-2018

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

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

26-04-2018

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

Avatar

Avatar
Validate 1
Level 2
lif66417554
Level 2

Likes

4 likes

Total Posts

15 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
lif66417554
Level 2

Likes

4 likes

Total Posts

15 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
View profile
lif66417554
Level 2

19-07-2018

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. 

Avatar

Avatar
Boost 1
Level 1
gregli
Level 1

Like

1 like

Total Posts

2 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
gregli
Level 1

Like

1 like

Total Posts

2 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
gregli
Level 1

31-12-2018

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?