In Unified Service Desk (USD) we have an action called “SetLanguage” but what does this action do and when might you use it? When someone first pointed this action out I could only find very limited information. In this post I hope to give a full explanation of the SetLanguage feature.
The Microsoft website does mention the SetLanguage action but no details are given. The reference below suggests an action exists that will allow us to control the language used to spell check notes. (But gives us no insight into how the action works.)
By way of an example I’ve decided to add the ability to choose a language directly on the notes control in my USD application. See below how I’ve added a toolbar to the notes control that allows language selection. (And that the French language is being used, as Homme isn’t a spelling mistake but the English word “woman” is.)
The steps involved with this change are;
- Install some languages
- Create a UII Action
- Creates some Actions
- Create a Toolbar
- Create some toolbar buttons
FYI: I am going to assume that you already have a notes control working in USD!
Step One – Install Some Languages
Before you start you are going to need to have installed whatever languages you wish to use. Depending on your install of Windows you may need to install several language packs. Mine only had English installed!
My desktop at home is running Windows 10, so I will give you instructions for that. (I guess the process will differ with other versions of Windows.)
You can see above that I’d already implemented English and French, say I wanted to add German. Before making the changes in Unified Service Desk I will need to load a German language pack. To do this I first go to windows settings and select the “Time & Language” option.
Next I select the Region & Language option.
Below you can see I have English and French installed. And that I next select the Add a language option to add another.
You will now see that there are loads of languages to pick from. Bit of a geography lesson for me, there are languages in here I have never even heard of! J
I selected German and then I selected the variant of German I wanted to install. In my case German (Germany).
Having selected the language I required, I used the “Options” button and selected to download the language pack.
Finally, below you can see that the language pack install begins.
Step Two – Create UII Action
By default the action “SetLanguage” may not exist in your Unified Service Desk configuration. It will probably need to be added. This is a simple process, navigate to your notes hosted control and find the UII Actions option.
Then in here simply add a new uii action called “SetLanguage”. Mine is shown below. Basically I just clicked new and gave the action a name. There is no need to change any of the other fields.
Step Three – Create Some Actions
Next I am going to need an action for each of the languages I want to use. My action for German is shown below. Notice that my hosted control is “Notes” and my action is the one we just added. (SetLanguage)
Also in the data field I enter the “language culture name” for my selected language. English(UK) was en-GB, French was fr-FR etc.
Tip : You might not know the “Language Culture Names” for all languages! The link below will provide you a table for all supported languages.
Step Four – Create a Toolbar
Next I wanted to add a toolbar to my notes control, so in the toolbar option in Unified Service Desk settings I added a new toolbar. Mine is shown below.
Don’t forget to link your toolbar to your notes hosted control using the hosted controls option in the toolbar navigation!
Step Five – Add Some Buttons
Firstly I added one button to my newly created toolbar. This just had “LANGUAGE” as its button text. As shown below.
Next I used the Toolbar Buttons in the navigation of my LANGUAGE button to add a button for each of my selected languages.
My German button looked like this …. Notice that I have also added the action we created earlier. So that selectin the button will trigger our SetLanguage action.
My final list of toolbar buttons looked like this.
I hope this post has explained the SetLanguage action in detail. Auf Wiedersehen! J