Getting a list of available (languages) resx files

我的未来我决定 提交于 2019-12-10 11:24:07

问题


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?


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/1283602/getting-a-list-of-available-languages-resx-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!