Coming soon: Your brand new Help Center & Community! Get a sneak-peek here

Force GUI language for all users?

Hi, we've upgraded a customer with hundreds of users during the weekend, from 8.0 to 8.2.

In Service all users now have English GUI, and we want to switch them over to Norwegian without all users having to do it manually.

They use Windows client and Service. When clicking the Service button in the Win-client I can see that it contains &Language=NO in the URL, but doesn't seem like that is used anymore?

Is there any way to set the default language in Service to be Norwegian?

RE: Force GUI language for all users?

Ok, think I'm one step closer to figuring out why the GUI in Service is english.

When clicking the "Service" button on the left side in the Windows client it creates a URL that contains

&Language=no

When Service opens up it is in Norwegian, but when you click to any other page it will fall back to English.

However, if I put up my own button in the Windows client, and tell it to use

&Language=nb-NO

then the language is handled correctly all the way in Service.

Looking at the cookies used, I see that the cookie-value 'SoCrmCurrentUserUICulture' is set to 'nb-NO' when everything is OK, but to 'no' when it falls back to English.

Could there be a bug here where Win-client uses 'no' and Service expects 'nb-NO' ? (This is 8.2 R04 - the version build 9th march).

Af: Frode Lillerud 8. apr 2018

RE: Force GUI language for all users?

Short answer: Yes.

/cornad

 

Don't know how many zillion times we have been trying to get this right and map between Old Win language codes and new Web language codes...

Af: Conrad Weyns 9. apr 2018

RE: Force GUI language for all users?

Good, thanks for confirming.

Now it'll be a zillion and one :)

As a workaround, what are my options for removing the Service-button from Win? Cause I assume I cannot alter the URL it uses?

Af: Frode Lillerud 9. apr 2018

RE: Force GUI language for all users?

What happens if you set the correct cookie in the browser for the user? Is it overwritten everytime you start Service from Windows?

Sverre

Af: Sverre Hjelm 9. apr 2018

RE: Force GUI language for all users?

Did you try to update language in ejuser table? Or does it no longer work in 8.2?

Af: Emilija Vilija Treciokaite 9. apr 2018

RE: Force GUI language for all users?

Yes, Sverre, opening Service from 'Service'-button in Win will end up resetting the Cookie value.

It has the correct language on the FIRST screen you come to, but when you navigate to next screen it'll fallback to english.

1. Start Win client (using Norwegian GUI).

2. Click "Service" button.

3. Set language using new Language menu. This will set the SoCrmCurrentUserUICulture to f.instance 'nb-NO'.

4. Close browser.

5. Click "Service" button in Win client again. Observe it contains &Language=no in URL.

6. Observe that Service is in Norwegian (but that is because it uses the Cookie value set the last time).

7. Navigate to somewhere else. Observe GUI language is English, and cookie value SoCrmCurrentUserUICulture is set to 'no'.

 

Emilija, settting crm7.ejuser.language doesn't seem to work.

Af: Frode Lillerud 9. apr 2018

RE: Force GUI language for all users?

Win asks netserver for urls that we use in service, mailngs and dashboards.
Initialy, we pass on our classic old-fashioned 2 characters language code.

However, since sept 13 2017, changeset 58273, the language code is preprocessed by another netserver method.
CultureDataFormatter:

    string MapSuperOfficeLanguageToCulture(string SuperOfficeLanguageCode).

This one does the following mapping using a dictionary:

{"cz","cs"},
{"cn","zh-cn"},
{"da","da"},
{"fi","fi"},
{"fr","fr"},
{"ge","de"},
{"it","it"},
{"jp","ja"},
{"nl","nl"},
{"no","no"},
{"pl","pl"},
{"ru","ru"},
{"sp","es"},
{"sw","sv"},
{"us","en"},
};

We then end up asking the ConfigurationAgent:

  string GetCRMUrl(string soProtocol, string currents, bool frameless)

Typically, soProtocol and currents will contain:

"service.ticket?action=mainMenu"
"&Language=en"

The url returned is finally used as is in one of our Browser cards.

/conrad

Af: Conrad Weyns 9. apr 2018

RE: Force GUI language for all users?

Thanks for the insight, Conrad.

In this case I would have guessed that MapSuperOfficeLanguageToCulture should have returned 'nb-NO' for Norwegian (Bokmål), in the same way that 'cn' (Chinese) in that map is configured and according to these Culture Names.

@Sverre, perhaps you could also shed some light on how Service uses the &Language= variable? In what format does it expect the language?

Af: Frode Lillerud 9. apr 2018

RE: Force GUI language for all users?

It's a 2-step conversion.
"no" is the neutral code."nb-NO" is for "bokmål", "nn-NO" is for "nynorsk".
"en" is the neautral code for english, "en-GB" is "english - united kingdom", "en-CA" is for canada etc. etc. there are many.

Inside the ConfigurationAgent, behind the scenes of GetCRMUrl, the neutral language code will be interpreted.
The CS universe is responsible for that.

Conrad

 

NB: Now that win uses the netserver doc-plugin, we have similar issues in this domain...
Not surprisingly, the are 2 sides to sharing code between clients. One of which has a very long history :-)

Af: Conrad Weyns 9. apr 2018

RE: Force GUI language for all users?

Hi, has this been given a Bug ID? Any thoughts on when it will be fixed?

Af: Frode Lillerud 30. apr 2018

RE: Force GUI language for all users?

For anyone others experiencing this, here is a temporary workaround which will hardcode the GUI language in Service.

Add the following line in "System scripts, Main Menu", so that it is executed whenever you navigate in Service.

setCookie("SoCrmCurrentUserUICulture", "nb-NO", true);
Af: Frode Lillerud 2. maj 2018