internationalise field in model (maybe with globalite)

hi all

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 by creating plugin or helper.


i think i'm nearer at a possible solution, but i didn't solved it yet :slight_smile: my current problem:

I have a user model, where i want to save the chosen salutation and country. So, i'm using Globalite Google Code Archive - Long-term storage for Google Code Project Hosting. and i want to use the existing :countries_list.l and my :salutation_list.l

My current implementation: Parked at Loopia

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 :slight_smile:

thx a lot!

i think i found a good solution: Parked at Loopia

We wrote an article that might be useful if you are having issues in the setting up of globalite plugin.

Feel free to ask anything you don’t understand.


Sorry, I forgot to paste the url