Scense
Howto create a Language (enviroment) variable - Printable Version

+- Scense (http://www.scense.com/forum)
+-- Forum: Scense User Group (http://www.scense.com/forum/forumdisplay.php?fid=1)
+--- Forum: Applications & Tools (http://www.scense.com/forum/forumdisplay.php?fid=7)
+--- Thread: Howto create a Language (enviroment) variable (/showthread.php?tid=117)



Howto create a Language (enviroment) variable - JVD - 09-25-2020

Good afternoon,

I would like to know howto create a Language environmentment variable? We are using XA_Duits, XA_Engeles, XA_Nederlands (in active directory)and i would like to store these groups for the user that logs in as a variable. And i would like to store it as IETF (nl-NL, en-US) and as a simple variable: nl, en.

So how do i convert these Active directory groups to variable i can use in: http://www.scense.com/forum/showthread.php?tid=14 to create my own custom ini file with %variable% in the ini file.

I have attached an *.ini file that is used by an application.


RE: Howto create a Language (enviroment) variable - Richard - 09-25-2020

The simplest way to tackle this:
  • Create an Environment action in the logon sequence for each language(group), create a variable (e.g. LANGUAGE) and set it to 'nl-NL' or one of the others.
  • Make sure the environment variable is propagated
  • Make sure this action only executes if the user is a member of the corresponding XA_ group, so set a condition on this action that tests for the correct groupmembership
So, in your example you could add 3 Environment actions (one for each language group) and set the LANGUAGE environment variable accordingly.
At next logon %LANGUAGE% will resolve to one of the IETF strings.

Cheers,
Richard