I'm currently learning cakePHP and here's one thing I have no idea how to solve.
I have a table named "countries" (id, iso, name, iso3, numcode) which is also a Model (with a controller and some views).
This table contains 239 entries - all of them have their name (such as "Germany" etc). What if I wanted to translate the "name" column to other languages?
So that for example in French version of the app it would say "Allemagne", in English it would say "Germany"...
I've already checked i18n and I'm using the __() function elsewhere in my application. But I'm not really sure how should I do this.
If I copy the names from the database into some language files, every name will appear twice in the app - that's against the DRY principle.
And if some new country is formed and is added to the database, it would be missing in the language file.
What's the right way to do this?
THanks a lot!
-- Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
No comments:
Post a Comment