Get available languages from resource

2019-07-31 07:21发布

问题:

I should programmatic get all languages, for which there are resources. Can someone point me to the way, how I can do this?

Update

Now I have adding code for enumerating all resource-files, parsing the filenames and getting the languages out of the filenames. But I think, there should be a bether solution for this.

回答1:

These series of articles from http://www.ondotnet.com/ a good start for getting and building a different resource files(.resx files) for different languages :

.NET Localization, Part 1: Resource Managers

.NET Localization, Part 2: Creating Satellite Assemblies

.NET Localization, Part 3: Localizing Text

.NET Localization, Part 4: Localizing Units

or if your using web applications ..

you can do like this...

Read ASP.NET Globalization and Localization and ASP.NET Globalization and Localization, both from MSDN. I have found that following the Microsoft practices on localization is easy and does the job.

you can use this solution for getting all languages and you will set your own language as a default language for entire application.....



回答2:

Are you looking for this kinda app Resource Editor, i guess this is not what you want but sure this'll give you a way.



回答3:

Now I have adding code for enumerating all resource-files, parsing the filenames and getting the languages out of the filenames. But I think, there should be a bether solution for this.