Hello!

I want to solve the problem of correct localization of noun cases
(nominative, accusative) and genders in some languages: Russian, Spain
and so on.
The problem is that a word in my case comes from database, so its
gender is dynamic information.

I am going to make a few messages, each for concrete gender (it is
just an example, I am not good in Spain):

myMessages.properties:
titleNew_masculine={0} nuevo
titleNew_feminine={0} nueva

And I want to get these messages dynamically in such a manner:

String gender = myObject.getGender();
String title = myMessages.titleNew(gender, obj.getName());

String title2 = myMessages.titleNew("feminine", "La pizarra"); // =
"La pizarra nueva"

It gets a proper message by the first parameter and then fills it with
all the rest parameters.

Current implementation of messages does not allow this.
Another problem is that initially I don't know the rules for each
language, so I cannot create interface MyMessages, because I don't
know whether there will be genders or not in some language.
I can only say that there will be parameterized message "titleNew" and
corresponding methos titleNew().

Please, help me find a solution for this problem.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to