i have a model ‘user’ with a ‘country’ references field and a model
‘country’ with a ‘name’ field. now i’m trying to internationalise my
application with globalite. but how do i solve that in my model? shall
i create an other field called ‘language’ in my model ‘country’ or is
there an sexier way? maybe without an ‘country’ model?
Let me get you first, what do you want make your web is automatically
changing language based to user country? If yes, you do not need create
language and model country, you only need to create plugin and in that
plugin contains array or hash to detect user’s country and reference the
country code or user’s country to translator.
You can use mashup method to link your application to google.com/tranlate_t by creating plugin or helper.
i think i’m nearer at a possible solution, but i didn’t solved it
yet my current problem:
I have a user model, where i want to save the chosen salutation and
country. So, i’m using Globalite http://code.google.com/p/globalite/
and i want to use the existing :countries_list.l and
my :salutation_list.l
Now the problem is, the chosen salutation (and country) will be saved
as string into the model. so if the user switches to an other language
and visits the user edit page, the salutation (and country) can’t be
mapped (taged as ‘selected’) because they were saved as strings.
Now my question: is there an easy way to map this lists to integers,
and only save the integer values into the model, so they can mapped to
the right list item, whatever lanugage is chosen?
it’s my first multilanguage application
thx a lot!
On 28 Apr., 12:04, Visit Indonesia 2008 <rails-mailing-l…@andreas-