i18n 1.2.0
New version of yiisoft/i18n package was released.
This version adds LocaleProvider and raises required major PHP version to 8.
New version of yiisoft/i18n package was released.
This version adds LocaleProvider and raises required major PHP version to 8.
First stable version of Yii Translator DB Message Storage was tagged.
This package provides the database storage for the yiisoft/translator.
It allows you to store messages in databases supported by yiisoft/db: MariaDB, MSSQL, MySQL, Oracle, PostgreSQL, and SQLite.
New version of yiisoft/i18n package was released.
This version adds support for keywords hours, colnumeric, and colcasefirst. These keywords are part of the ECMAScript 2022 Internationalization API Specification (ECMA-402 9th Edition), and supporting them allows for better cross-communication between PHP and JavaScript layers.
hours defines an hour cycle for the locale (i.e. h11, h12, h23, h24). For more information see the key/type definition for the Unicode Hour Cycle Identifier.colnumeric and colcasefirst are both collation settings defined as part of the Unicode Locale Data Markup Language.First release of translator package was published. This package allows translating messages into several languages. It can work with both Yii-based applications and standalone PHP applications.
Translations in the code looks like the following:
// single translation
$messageIdentificator = 'submit';
echo $translator->translate($messageIdentificator);
// output: `Submit message`
Another Yii3 family package is released. This time it is yiisoft/i18n. The package provides common internationalization utilities and currently includes a Locale class. It stores locale information created from BCP 47 formatted string. Can parse locale string, modify locale parts, form locale string from parts, and derive fallback locale.
$locale = new \Yiisoft\I18n\Locale('es-CL');
echo $locale->language(); // es
echo $locale->region(); // CL
$locale = $locale->withLanguage('en');
echo $locale->asString(); // en-CL
echo $locale->fallbackLocale()->asString(); // en
The package has 100% code coverage and 100% mutation score.