SIMONJONES wrote:
Surely this is such a common problem, somebody must have come up with a cunning "best practice"?
I'm afraid there is no such thing as a localization best-practice. It all depends on the context where you need the localization.
Fortunately we've got the same scenario as you are describing (data-localization) and also searched almost the entire web to find out there is no best-practice. But your solution looks a lot like the one we ended up with :).
Around the data-model that stores localized strings, we created NHibernate-mapped classes and a Singleton TranslationService class that uses those classes and can add, remove translations and offers some easy access for retrieving strings. For example, in our ASP.NET pages we can do things like <%# TranslationService.GetText(Container.DataItem, "PropertyName") %>.
Quote:
4) How do we "black-box" the globalization so our developers don't have to know/think about it when they use the domain objects? e.g. measure of success = developer binds a column to User.Gender.Description and the correct language is returned depending on CurrentLocale
This is very hard. You'll probably have to use some AOP techniques for this to make it really transparent.