开发者

resx files with Custom Extensions

I am using custom resources to manage my information on a site with the following Properties for the resx files

  1. Build Action: Embedded Resource
  2. Custom Tool: PublicResXFileCodeGenerator

Resource File names are the following.

  • Resource.fr.FR.resx (French version of a website for France)
  • Resource.fr-BE.resx (French version of a website for Belgium)
  • Resource.resx (Fallback resource)

This works fine, but when I try to add a custom resoure as such

  • Resource.ja-BE.resx (Japanese version of a website for Belgium)

The PublicResXFileCodeGenerator generates a C# code behind for this and thinks its a new fallback resource for something else. I am guessing that the tool reasons that this is not a valid Culture and therefore it is behaving that way.

Ho开发者_如何学Cw do you get around this and allow the declaration of a custom resource in this way, or is there a different way I should be going about this problem?


Create and register your culture using the information found at this msdn article and your ResourceManager should correctly recognize your resource file.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜