views:

49

answers:

1

I have client that wants to specifiy their own version of localized content for a subset of my string resources.

For simplicity here is basic example:
Lets say I have 2 localized strings (showing english content)
PageTitle="Hello World"
PageDescription="This is a more wordy version of Hello World!"

I wish to localize these so I have resource files.

  • Strings.resx (contains my English string)
  • Strings.fr-ca.resx (contains my French-Canadian strings)
  • Strings.fr-ca-clientX.resx (contains my strings for a Client whom is French-Canadian and therfore very picky;) - just joking)

Ideally "Strings.fr-ca-clientX" can specify only the strings they want to "override". In other words they may just wish to change the PageTitle and continue using the PageDescription from the "fr-ca" resource file.

So how do I go about this in .NET? Ideally I would just create the resx file and specify the culture in my "Web.config" and it should work...

<globalization uiCulture="fr-ca-clientX" culture="fr-ca-clientX" />

However, this does not work. "The tag contains an invalid value for the 'culture' attribute" is my first obsticle.

Thanks,
Justin

A: 

You probably need to create your own culture and register it. You'll find MSDN article on that topic here.

You don't need to alter culture attribute, it should stay at "fr-CA", as uiCulture attribute is responsible for loading strings from resources.

Paweł Dyda