views:

349

answers:

1

We have a custom business culture we've created, let's call it customer. So we've created a custom culture, en-GB-Customer.

That all works fine if we have a base resource file and then the customer resource file, e.g. Login.aspx.resx and Login.aspx.en-GB-Customer.resx We see text for general users and then text for Customers depending on the culture.

We have certain aspx pages that are only used by this business culure, e.g. CustomerWelcome.aspx

Ideally we'd like all the customer resources in *.en-GB-Customer.resx

However for some reason, if we only have a CustomerWelcome.aspx.en-GB-Customer.resx file, its not being picked up. The only thing that is displayed is the text in the text='' field on that page. If I rename CustomerWelcome.aspx.en-GB-Customer.resx to CustomerWelcome.aspx.resx then we see the Customer specific stuff.

How do I get this to work?

+1  A: 

You always need to provide a fallback resource file, that is, without a culture specified. otherwise it does not work correctly.

So you'll need to keep two files with basically the same content.

CustomerWelcome.aspx.resx (fallback)
CustomerWelcome.aspx.en-GB-Customer.resx
Developer Art