Strange behavior of the Language Selector component

Hello everybody.

We are experiencing a strange behavior of the “Language Selector” component.

The following picure show our custom authentication dialog, where the customer could also change the language.


ONLY the first time that the client starts, the selector shows three options:

• English
• français
• français (France)

But we expect only the first two.
As soon you select one of them, “magically” the component arranges its items and it shows only two languages:


Why?
Does exists a workaround to fix this?

Thanks in advance.

It’s a byproduct of a workaround we had to do, and is on our list of annoyances to fix some day.

What happens is that we need to make sure the currently selected locale is in the drop down list so it can be the selected item (i.e. the item you see when you haven’t clicked on the drop down yet.) When you start the client, if you didn’t change the locale at the log in screen, the current locale is the locale reported by the JVM. Once you’ve made a change with the language selector (or via scripting), the current locale will be one from the locales you’ve defined in the translations. Since the list of locales retrieved by the language selector includes the current locale, nothing extra gets added.

Currently, your work around would be to set the locale with scripting when the client opens. The good news is that while I was typing this explanation, I figured out a fix for the problem and it should be able to get into 7.7.4.

Ohh yes, now it works.

Now, inside our client startup script, I have written:

system.util.setLocale([color=#FF0000]“fr”[/color])

instead of

system.util.setLocale([color=#FF0000]“fr_FR”[/color])

Now we see always only two entries.
Thank you.

Has this been fixed in 7.7.4 ?
I am making a project on a french computer. The project will have 2 languages English and slovak. I however still have a “français” option in my language selector. And it dissapears as well when I select a language.

I think so. From the 7.7 change log, I see “Language selector no longer adds variants that duplicate existing languages.” which looks like the fix.

Ah okay, it is not that exact bug then.
My problem is that it adds a language that is not contained in the Translation Manager.

The workaround used here works however.