Componette

Componette

nexendrie

nexendrie / translation 2.3.2

Easy translating of PHP applications

download-cloud-line composer require nexendrie/translation

Translation

Total Downloads Latest Stable Version Build Status Code Coverage License

Translate easily your application

Installation

The best way to install it is via Composer. Just add nexendrie/translation to your dependencies.

Documentation

See: https://nexendrie.gitlab.io/translation .

  • 2.3.2 Version 2.3.2

    Changelog:

    • fixed compatibility with nette/php-generator 4
  • 2.3.1 Version 2.3.1

    Changelog:

    • fixed compatibility with PHP 8.0
  • 2.3.0 Version 2.3.0

    Changelog:

    • raised minimal version of PHP to 7.4
    • used typed properties (possible BC break)
    • deprecated some getters and setters
  • 2.2.0 Version 2.2.0

    Changelog:

    • raised minimal version of PHP to 7.3
  • 2.1.0 Version 2.1.0

    Changelog:

    • count can be passed together with other parameters to Translator::translate()
    • symfony/yaml 5 is supported, dropped support for 3
    • re-added support for nette/finder 2.5
    • allowed resetting language in default settable locale resolvers
  • 2.0.1 Version 2.0.1

    Changelog:

    • fixed overriding default folders in Nette DIC extension
  • 2.0.0 Version 2.0.0

    Changelog:

    • removed old interfaces for loaders and locale resolvers
    • dropped support for Nette 2.4
    • marked almost all classes as final
    • removed method ChainLocaleResolver::addResolver()
    • added IFileLoader interface
    • changed meaning of result of FileLoader::getLanguageFilenameMask()
    • MessagesCatalogue no longer extends PhpLoader
  • 1.2.0 Version 1.2.0

    Changelog:

    • raised minimal version of PHP to 7.2
    • deprecated method ChainLocaleResolver::addResolver()
    • moved interfaces for loaders and locale resolvers to Nexendrie\Translation namespace, deprecated old versions
  • 1.1.2 Version 1.1.2

    Changelog:

    • improved handling of non-file resources in Tracy panel
    • fixed scrolling in Tracy panel if list of resources is too long
    • fixed columns in table Loaded resources in Tracy panel
  • 1.1.1 Version 1.1.1

    Changelog:

    • CatalogueCompiler now compiles catalogues only when source files has changed
    • fixed numeric subdomains being renamed (to start with 0)
  • 1.1.0 Version 1.1.0

    Changes in dependencies:

    • raised minimal required version of nette/di to 2.4.10
    • symfony/yaml 4 is supported

    Improvements/changes:

    • added ISettableLocaleResolver interface
    • added event onCompile to CatalogueCompiler
    • added message selector
    • added events onLanguageChange, onFoldersChange and onLoad to FileLoader
  • 1.0.0 Version 1.0.0

    Version 1.0.0 is finally out. Feature freeze is gone and new features are again accepted. List of changes since last RC follows.

    Removals:

    • removed support for old format of defining folders for Nette DI extension (BC break)

    Changes:

    • ChainLocaleResolver now extends Collection from nexendrie/utils
    • replaced constant EnvironmentLocaleResolver::VAR_NAME with property $varName (BC break)
    • added return type hint for FileLoader::loadDomain() and ILoaderAwareLocaleResolver::setLoader() (BC break)
  • 1.0.0-rc3 Version 1.0.0-r3

    Third release candidate for 1.0.0 is out. Please, try it out and report any issues you encounter. Feature freeze is still in place.

    Fixes:

    • fixed detection of resolver in FileLoader

    Improvements:

    • added link to loaded resource in Tracy panel
    • variable for SessionLocaleResolver can be changed now

    Changes:

    • renamed constant EnvironmentLocaleResolver::VARNAME to VAR_NAME (BC break)
  • 1.0.0-rc2 Version 1.0.0-rc2

    Second release candidate for 1.0.0 is out. Please, try it out and report any issues you encounter. Feature freeze is still in place.

    Changes:

    • moved InvalidLoaderException and InvalidLocaleResolver back to namespace Nexendrie\Translation (BC break)
    • changed format for defining folders for Nette DI extension, deprecated the old one (will be removed in 1.0.0)

    Improvements:

    • folders are now ignored by Nette DI extension if no file loader is used
    • Nette DI container is now regenerated whenever translation files change
    • parameter for ParamLocaleResolver can be changed now
  • 1.0.0-rc1 Version 1.0.0-rc1

    First release candidate for 1.0.0 is out. Please, try it out and report any issues you encounter. Feature freeze is in effect, we want to focus on fixing issues and cleaning code, no new features will be added before version 1.0.0.

    Changes in dependencies:

    • added dependency on nexendrie/utils

    Changes:

    • moved IAppRequestAwareLocaleResolver to namespace Nexendrie\Translation\Bridges\NetteApplication (BC break)
    • moved InvalidLoaderException and InvalidLocaleResolver to namespace Nexendrie\Translation\Bridges\NetteDI (BC break)
    • made validation of config values (arrays) in TranslationExtension stricter
    • %appDir%/lang is always among used folders with Nette DI extension
    • changed default locale resolver to param, session, header in Nette DI extension
    • separated Intervals to package nexendrie/utils

    Fixes:

    • add actual domains to used resources in manually created messages catalogues
    • fixed appending loader to multiple ILoaderAwareLocaleResolver in Nette DI extension

    Improvements:

    • translator is now registered to Latte when available in Nette DIC container
    • made it possible to add custom callbacks to Translator::onUntranslated() from Nette DI extension
    • added support for negative numbers/infinite in intervals
  • 0.5.0 Version 0.5.0

    Changelog:

    • added pluralization
  • 0.4.0 Version 0.4.0

    Changes in dependencies:

    • raised minimal version of PHP to 7.1
    • nette/http and nette/application are now optional dependencies (they are required for some locale resolvers)

    New features:

    • added chain, session and header locale resolvers
    • added param locale resolver for Nette

    Improvements:

    • other Nette DIC extensions can add folders for translations now
    • added virtual property EnvironmentLocaleResolver::$lang
  • 0.3.0 Version 0.3.0

    Changes in dependencies:

    • nette/neon is now optional dependency

    Improvements:

    • catalogue compiler now uses loader's languages by default
    • added event onUntranslated for Translator

    BC breaks:

    • loaders have to define available languages
    • switched order of parameters $folder and $languages in CatalogueCompiler's constructor (as the latter has default value now)
  • 0.2.1 Version 0.2.1

    Changelog:

    • simplified using php loader and standalone messages catalogue with Nette DI extension
    • use texts from all folders in MessagesCatalogue
    • original resources are now stored in MessagesCatalogue
    • simplified using fallback locale resolver with Nette DI extension
  • 0.2.0 Version 0.2.0

    Changelog:

    • added JsonLoader, YamlLoader and PhpLoader
    • Nette DI extension can now compile catalogues from messages
  • 0.1.0 Version 0.1.0

    First version.

Componette Componette felix@nette.org