I18N Messages

Hi guys.

Here are some questions about app translation.

What are the best practices for localization apps like "advanced app template"?

Where should I store translation files? Do I need separate folders for "common" and "frontend"?

What "namespaces" should I use for separating translations for common and frontend?

For example, I can do this:

Create one folder for all translations and use something like


Yii::t('common/label', 'User name')

This way all translations will be kept under one ‘root’ folder (not very good, I suppose), but separated into some subfolders (/messages/en/common, /messages/en/frontend etc)

Is it good?

Another question: when I do


Yii::t('common.label', 'User name')

(notice the dot instead of a slash), translation files are named without prefix, i.e. label.php

Is it a feature?