Last post Oct 01, 2007 05:21 PM by jamlew
Sep 30, 2007 05:30 PM|Nuwanda|LINK
Hi, I write everything that needs to be translated in english ( static text, text on labels and buttons and data coming up from business objects) and wrap every string in a class.method("sometext") that gets the right translation from a database table, where
each language is one column (gets the same row as the english text I wrote in the code), if the user is marked as needing some other language then english. I would like to get rid of all the database calls and use resources, but I'm struggling with how to
do that and was wondering if someone used this same "local dictionary" approach to translate, but with resources and could help me out.
Everything I read is about using ID's on control's as translation key's and UI cultures.......I would like to set the language for each user administratively myself and see actual text in the source code.....any ideas or suggestions are appriciated.
Oct 01, 2007 06:21 AM|shantanushukla|LINK
Oct 01, 2007 07:15 AM|Nuwanda|LINK
Hi, Thank you for your response shantanushukla.
I can't use localized resources becouse they are to limited, there are simply to many pages to use localized resources.
Culture and initialization of that is something that I cant use for selecting language. The culture can be/is not representetive of the language to be used.
This is just dictionary stuff with resources......nobody uses resources like this?
Oct 01, 2007 05:21 PM|jamlew|LINK
Would it work alright if you were to cache the data for a given culture into a dictionary of some sort, so that you'd only have 1 DB call per culture? You could keep a dictionary of culture-specific dictionaries in the event that you need multiple cultures
(including fallbacks) on the same page. This sounds quite similar to having a ResourceProvider for your database; you might want to google around for one of those if this sounds about right...