Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 24, 2009 08:00 PM by shados
Feb 24, 2009 02:09 PM|LINK
Feb 24, 2009 02:57 PM|LINK
The easiest way to do this would be to simply create your own cultures, and install them on the machine running your app. These cultures would be literally clones of en-US (or whatever you're using), with absolutely no difference aside for their registered
name (a lot of cultures are implemented that way, by the way, with maybe minimal differences such as date format and thats it).
You can follow that example, but in your case, it will be even simpler. You make a new culture based on en-US, with a different name...let say, en-US-m and en-Us-f, or something, and change nothing else. Make this a command line application, that you'll
Then by simply setting the thread's UI Culture, and naming your resx files appropriately, you'll get the behavior you want. Much simpler than making your own resourceManager :)
Feb 24, 2009 07:02 PM|LINK
Hi shados, thanks a lot for your reply, it indeed seems much simpler :)
I read a bit about creating custom cultures and it sounds easy enough. I have one question left:
How can i specify the fallback culture for my new culture?
What I have in mind is creating a custom culture for each relevant language and call it for instance he-IL-f,
and then make sure it falls back to he-IL. That way i could only enter in the "female" file the strings that need changing..
appreciate your help
Feb 24, 2009 08:00 PM|LINK
For example, if you have ressource files for en-CA and fr-CA (english canada and french canada), and some strings aren't found in en-CA, it will then try to find a ressource file for just en, and failing that, it will use the ressource file without any culture
(the default ressource file).
I never tried it with cultures that had 2 levels, like en-CA-f, but i'm guessing it (hopefully) will work the same way.