Andrei B
Andrei B

Reputation: 21

How do I get a list of all languages that my Windows Forms application has been localized to?

I have localized localized a Form into two language by setting the Localizable property to True and setting the Language from (Default) to (Dutch(Netherlands)), and I changed the control texts.

Visual Studio generated the resource files and compiles them into the application.

I need to get a simple list of all the languages that my form has been localized into. Currently it would be just two English and Dutch, but more may come. I need to programatically get a list of "what languages my application is localized into". Do I look into the resource files or use ResourceManager or what?

Thanks!

Upvotes: 2

Views: 1287

Answers (1)

Vijay Sirigiri
Vijay Sirigiri

Reputation: 4711

For every language the form is localized to, you would get a satellite assembly within a folder. The folder name would be the specific culture. Ex: en-GB for English (United Kingdom). These folders would be created in the Application's base directory.

Populate the folder names in the Listbox, when a user selects an item store it in the config. And in the Main, before Form load set the current culture and current UI culture.

Upvotes: 1

Related Questions