c# - How can I stop ResourceManager from defaulting to my current culture if a key is not found -


the question pretty self-explanatory, here's sample reproduction case.

i have 3 resx files:

translations.resx   has code generation enabled , no key-value pairs 

translations.en.resx   string1 : value1   string2 : value2 

translations.fr.resx   string1 : valeur1 

to obtain resource french resource can call:

translations.resourcemanager.getstring("string1", new cultureinfo("fr")); 

this returns valeur1 expected. changing parameter string2 returns value2 follows resource fallback process.

what shut off process , allow null returned if key not in specific culture provided getkey. possible , if how accomplish this?


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -