How to work with Languages in Dataverse. #238
MattB-msft
started this conversation in
Show and tell
Replies: 1 comment
-
We have this topic that covers working with languages programmatically But it doesn't call out that Organization.LanguageCode has the base language. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In a recent discussion, concerning how to detect language availability and install language packs on dataverse, I realized that we really didn't have a concise location for the various means to work with languages in the dataverse system.
I ended up writing up a quick what to use for what list for the person asking.
In the effort to head of further confusion about it, I will copy that here:
In all cases, Dataverse "the system" refers to Languages by LCID (Language Code Identifier).
Various applications that are built on top of the Dataverse system will use ISO formats for readability.
For example: ISO:en-us|LCID:1033
1. Getting the current Default language of an environment:
You can get the default language of the environment by asking the organization table for it. The field is languagecode
2. Getting the current list of Languages that are enabled on a given Dataverse Environment:
To get all languages active on the environment (meaning installed and ready to us) you would use RetrieveAvailableLanguagesRequest. This will return a list of LCID’s that are enabled on the org.
3. Getting the list of language packs that are available to a given environment:
If you want to see all languages available to the server, ( not necessary activated) you would use RetrieveInstalledLanguagePacksRequest –
Note: 1033 will generally not appear here because it's not a language pack, it’s the native language, unless the server is built using a different language.
4. Getting the version of a language pack installed on a Dataverse environment:
To get the version of the language pack installed you would use RetrieveInstalledLanguagePackVersionRequest. Which will give you the version number of the language pack installed.
5. To issue an Install command for a language pack:
To install a language pack you would use either ProvisionLanguageAsyncRequest or ProvisionLanguageRequest. The recommendation is to always use the Async version of this request, it will return an AsyncOperationId which you can then use to monitor status of the install request via query to the asyncoperation table.
Beta Was this translation helpful? Give feedback.
All reactions