The CakePHP book has a section on Internationalization & Localization. Bascially what it says is Cake will generate a pot file and we have to create a .po for differ开发者_Python百科ent language file from the pot file.
My problem is I want the user to be able to edit these localized text so instead of storing the localized text in the .po file I want to store them in the database.
So how can I store the localized text in the database?
There's a Behavior for that.
Personally I find the TranslateBehavior to be rather inflexible though, so I usually just go with a separate table connected to the main model via a belongsTo relationship which contains all the translations. I then pick the one to display in the View.
精彩评论