What kind of locale IDs we should use in Yii2?

I think that there is a discrepancy in documentation for translations or I am missing something obvious.

The “Locale” section says:

(…) It is usually identified by an ID consisting of a language ID and a region ID. For example, the ID en-US stands for the locale of “English and the United States”. For consistency reasons, all locale IDs used in Yii applications should be canonicalized to the format of ll-CC, where ll is a two- or three-letter lowercase language code according to ISO-639 and CC is a two-letter country code according to ISO-3166.

But when you narrow down to the "Using the message command section or browse Yii 2 source files, you can clearly see that everything and every one is using IDs consisting of a language ID only:

./yii message/config --languages=de,ja --messagePath=messages path/to/config.php

or files in /vendor/yiisoft/yii2/messages which are all stored in en-like folders with only a few exceptions.

What am I missing? What truly I should use when calling yii message command-line commands and should I use 'language' => 'pl-PL' or 'language' => 'pl' in /frontend/config/main.php etc. files?

I know and understand that this is just a string and that the whole thing will work no matter, if I sue single or double language ID, as long as I use the same scheme everywhere. Yet, I’d like to use “the best possible standards”. And I would like to know, if the documentation has discrepancy or if everything is OK there and it is just me who is missing something bluntly obvious? Thanks!