Nique
Nique

Reputation: 583

Getting a list of available (languages) resx files

Many many programs have communities that adds languages to the application after it got released.

So, in the settings window of a program, people can see a dropdown list of available languages. Well how do people code this while using resx files for localization? I've searched the web over and over again, but couldn't find any answer.

everything is working well, but now, i need to make a dropdown list of available languages. To make it clear, i do not want to release a new version every time someone created a new language for the program.. because that's what i have to do if i have to make a hardcoded list of languages that are available to pick.

How do i get a list of available resx files?

Upvotes: 2

Views: 5278

Answers (2)

Hans Holzbart
Hans Holzbart

Reputation: 1193

You can programatically list the cultures available in your application. The approach is described here

Upvotes: 5

Noon Silk
Noon Silk

Reputation: 55082

Well, even if you could get a list (and you can I guess, by inspecting the filesystem), depending on how you implemented your localisation, it may not be accurate (may have not provided a translation for the specific .resx you're looking for).

I'd suggest the best way to do this is in a .config somewhere (or database). That way you can disable languages independantly of the .resx system; which is something that will inevitably come up.

Upvotes: 0

Related Questions