开发者

Problem with changing language using CultureInfo

开发者 https://www.devze.com 2023-03-19 22:25 出处:网络
La开发者_如何学JAVAnguage is not getting changed when we are giving specific culture like \"fr-FR\" through Resource File.please help me out of it if any one knows ,Thanks in advance.

La开发者_如何学JAVAnguage is not getting changed when we are giving specific culture like "fr-FR" through Resource File.please help me out of it if any one knows ,Thanks in advance.

  CultureInfo cinfo = new CultureInfo("fr-FR");
  Thread.CurrentThread.CurrentCulture = cinfo;
  Thread.CurrentThread.CurrentUICulture = cinfo;

The below code indicate that accessing the value through resource1 file according to the culture .

  _inboxpage.Text = Resource1.Ready;


The resource files need to have a special naming convention to work transparently with different culture information.

You create a separate resource file for each language that you want to support or for a language and culture. Have one separate neutral resource file for the application to fall back upon in case the required key/value pair is not found. ex:

Resources.resx //neutral resource file

Resources.fr.resx //french specific file

Resources.fr-FR.resx //French language for France

and so on.

You can get more details here:http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo.aspx


Finally i got a solution that while doing Localization in Plugin Application we need to copy that culture folders like "fr-FR" to corresponding Main Application then it will works fine.

0

精彩评论

暂无评论...
验证码 换一张
取 消