2

After searching a lot on internet when I could not get a solution I am here.

I have a requirement in my project which supports multiple languages.
When I am switching to a specific language it works fine if the language is already there in system language preferences, if not it shows an error.
To resolve error I had to go manually to the below location and then add language.

Control Panel\All Control Panel Items\Language >> Add a Language

And everything works as expected.

This is what I want to do programmatically: In code somehow I could add a language to system language preference list.

(c# - preferred language).

How would I do this?

1 Answer 1

0

You might want to consider installing the language during the installation of your software, if it's a desktop application, because adding a new language will require admin rights anyways.

If it's a web page, you will have even more troubles doing so because there will be no installation program.

You might want to make a specific culture mandatory and choose to support a fallback instead.

Edit:

For a manual installation that could be automated during your installation procedure, you can find language files on Microsoft's website: (pick the "Download Center" version) and follow the tutorial for unattended windows installation :

if it can be of any use, this post on SuperUser will show you which rights are required to install a language.

3
  • Luckily Its a windows application. Can you elaborate a bit more how to install a language while installing application.
    – C For Code
    Oct 5, 2015 at 8:05
  • if you have a setup program, such as InstallShield you can either add a script to install your language, or even maybe it is supported by the installation builder. it will really depend on what product you use. however, again, you should ask yourself : If I was a user of that application and I decided not to have that culture installed on my computer: Would I really want another software to install it for me behind my back? Oct 5, 2015 at 8:09
  • You can find language files here: windows.microsoft.com/en-gb/windows/language-packs#lptabs=win81 (pick the "Download Center" version) and follow that tutorial for unattended windows installation : technet.microsoft.com/en-us/library/cc766278(v=ws.10).aspx. If this works for you, I'll copy it in the Answer Oct 5, 2015 at 8:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.