Releases: RinkAttendant6/JsonI18n
Releases · RinkAttendant6/JsonI18n
v2.2.1
v2.2
New features
Strict mode
Added a strict
setting (defaults to true
). In strict mode, an exception is thrown when attempting to translate a key that is not defined in the resources for the given locale.
v2.1.1
Developer
- Removed all Node dependencies and move development scripts to Composer scripts
- Added PHP 7.1, 7.2, and 7.3 to continuous integration tests
- Updated development dependencies
v2.1
Updates
Bump minimum PHP version to PHP 7.1
Developer
- Added scalar type declarations for parameters and return types
- Added strict typing wherever possible
- Changed directory structure for compliance with PHP standard filesystem structure
- Changed code for compliance with PSR-2 coding standards
- Changed test cases for compatibility with PHPUnit 6.x
v2.0
Merge pull request #14 from RinkAttendant6/2.x 2.0
v2.0.0 (BETA)
New features
Sub-resources
Sub-resources allow you to split each locale's messages into separate JSON files.
Changed
New resource structure
{
"@metadata": {
"arrayGroups": {
"label": {
"en": "label_en",
"fr": "label_fr"
}
},
"description": "Whatever you want here, all properties in @metadata except arrayGroups is ignored"
},
"en": {
"greeting": "Hi, %s!"
},
"fr": {
"greeting": "Salut %s!"
}
}
This format was largely inspired by the jquery.i18n project by the Wikimedia Foundation, though the formats are not 100% compatible with each other.
Developer
- Added PHP7 and HHVM to continuous integration
v1.2.1
Bug fixes
- Fixed: Attempting to add a resource without an
arrayGroups
value caused a warning - Fixed: Values added to incorrect array in subsequent resources
v1.2
New features
- Support for PHP 5.6
__debugInfo
method (#5) - Resources of different types can now be added (#10). In addition to a file name of a JSON file, you can now pass into
addResource
:- JSON string
- PHP associative array resembling the expected format of the JSON
- Errors from
json_decode
will cause an exception to be thrown with the code fromjson_last_error()
instead of continuing silently
Developer
- phpDocumentor is added to the list of Grunt tasks
v1.1.2
v1.1.1
Bug fixes
- Allow localization of one-dimensional arrays using
localizeArray