C# Creating a setup for multi-language

。_饼干妹妹 提交于 2019-11-29 04:28:23

I found the answer

Click the Setup Project in Solution Explorer and then click Add\Project Output\ . From dialog select the project for which you want to include localization (satelite) assemblies and then select Localized resources.

After the installation in the folder that I install to, I have the th-TH folder which includes the satellite assembly.

Thanks,

Try adding in this at the app's startup (if it's not there):

Thread.CurrentThread.CurrentUICulture = CultureInfo.CurrentCulture;

Here is a short article discussing some of the options of how to make this work, and options for selecting the locale at runtime.


Edit after comments:

Make sure your satellite assembly is in the appropriate place, and built correctly. From that article I referenced:

"When .NET runtime starts an application it looks for a possible satellite assembly file. A satellite assembly file is a resource only assembly file that has .resources.dll extension instead of .exe ir .dll (if the main assembly is a library). Satellite assembly files always locate on a language specific sub directory of the applciation's main directory. If application file is Converter.exe then the Japanese satellite assembly file is ja\Converter.resources.dll."

There are a few things that you should check here. Check the name of the assembly. Also, make sure it's in the proper location. In your case, it should be in a th-TH subdirectory with the appropriate name under your executable. If it's there, it should be found and used properly.

Here is another good source of information about this topic.

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