2
我有一个工作resx本地化与Microsoft MVC4的基本语言,如英语,法语,德语等设置本地化设置,但我试图扩展到更具体的语言如简体/繁体中文。正确的Resx文件没有被选为非基础语言
我有一个名为我的建议的命名约定文件:
SharedStrings.de.resx
SharedStrings.es-es.resx
SharedStrings.es.resx
SharesStrings.fr.resx
SharedStrings.resx
SharedStrings.zh-cn.resx
SharedStrings.zh-tw.resx
右键我设置文化的Global.asax.cs中的Application_BeginRequest() ,做这样的事情:
CultureInfo ci = new CultureInfo(CultureInfo.CurrentCulture.Name);
ci = System.Globalization.CultureInfo.GetCultureInfo("zh-tw");
Thread.CurrentThread.CurrentCulture = ci;
Thread.CurrentThread.CurrentUICulture = ci;
当我加载页面,虽然它没有拿起zh-tw或es-es,但奇怪的是它拿起了zh-cn,de,en等等。我有点迷失在这里,所以我会很感激一些帮助。