none
How to avoid fall back to invariant culture in resource lookup ? RRS feed

  • Question

  • Hi,

    I am working with a standard WPF application. Text localization is implemented using a resource file for each language.

    Not all text a translated, therefore some resource files only contains a subset of the strings.

    When a string is not found, it must be looked up in the english resource file, and NOT the language invariant resource file (which contains all defined strings in draft version).

    My problem is then to get the resource manager to return null, when a string is not defined:

    resourceManager.GetString("dino is not defined") == NULL

    (In that situation, the code is intended to proceed and lookup the string in the english resource file.)

    This seems to be hard to get working. I have tried to override some functions in a customized ResourceManager, but without luck, the resource manager always falls back to the language invariant version of the string.

    Thanks in advance for any help.

    Friday, June 14, 2013 11:06 AM

Answers

  • Hi,

    I have decided to put the english language into the invariant langauge file, and not make any changes to the Resource Manager.

    • Marked as answer by WPFASL Tuesday, June 18, 2013 11:07 AM
    Tuesday, June 18, 2013 11:06 AM

All replies