Yii2 Messages: What does @@ mean?

Upon calling, ./yii message my-message-config.php

I found that some of my translations were surrounded @@

. What does it mean?

Example in posts / de _DE / app.php

return [
    'Edit color' => '@@Farbe ändern@@',



source to share

1 answer

In short: such entries represent localizations for obsolete keys.

Quite simple: on startup, ./yii message

all of your application files are scanned. The newly found keys will be added to the localization files. However, deleted keys will be marked with an icon @@

. Thus, such lines will not be removed, rather they will be marked. Just to make sure the translation work (which might be extensive) is not removed.

If you find such a flagged entry in the localization file, you will also find other occurrences in other localization files for that key - if there are further translations.

Regarding the example: This means the application code does not contain Yii::t('app', 'Edit color')


Actually, if you are using ./yii message

, this information is also part of the comment in the generated / updated localization file ...



All Articles