Best Practice for International Views


antl.formatmessage() is great when you have a few words or sentences, but sometimes you want to localize an entire view. With emails for example.

I could create locale folders inside the view folder, then just change the locale in the controller when I call the view.


Is this the best way?


Yes that seems like a reasonable way to do it. Going forward, I will look into better ways to make stuff like this work out of the box.


That would be cool.

Today, I’m working on a way to translate a simple string, not messages. Doing something like you see in many PHP frameworks


Just a wrapper for


If translations aren’t on, it just returns the phrase as is.

Another Ex:

__('Please enter a valid email')

Gonna have in in my view globals.