Download the PHP package atk4/i18n without Composer

On this page you can find all versions of the php package atk4/i18n. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package i18n

Translation service for Atk4\Ui

Interface for Symfony\Translation component for Agile Toolkit Ui.

Installation

Usage

Initialisation

The translator need initializing.

string $locale

The default locale use by the Symfony Translator.

MessageFormatterInterface $formatter

[optional] - You can supply your own formatter which comply to MessageFormatterInterface from Symfony. When null, the symfony translation component will create one by default.

string $cachePath

[optional] - This will cache translation resources files at specify location. It is recomand to use for production as it will speed up resource loading.

array $cacheOptions

[optional] - Will generate caches files according to this option. A good usage would be to specify caches for a translation version.

bool $clearCache

[optional] - Will clear caches files and regenerates resource file. For use in development.

Adding Resources files

Once translator has been initialized, add your translation resource files to it.

string $path

The path to the directory where your resource files are located. In order to load correctly, this directory must be organized per locale.

By specifing the languages path, the service will automatically load all resources within the specified locale directory and file type format.

Important:

Resource files name must follow this convention:

string $locale

The locale directory to load file from.

string $format

The file format to load that is located inside the specified locale directory.

The service support file of type: php, yaml, po, csv, json, xlf, ini, mo, qt.

The shortcut function _t().

The service expose a shortcut function in order to translate messages directly.

string $id

The id of the resource to translate.

array $param

[optional] - The parameter needed for translating the resource. Usually need for ICU message format.

string $domain

[optional] - The domain name. Default is 'messages'.

string $locale

[optional] - The locale name. Default is the one use in the service init method.

The Translatable message T::class.

You may define certain messages to translate at a later stage using the translatable message T::class.

Fallback locales

The symfony\translation component support fallback strategy for unavailable locale resources.

More information


All versions of i18n with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3.0
symfony/translation Version ^4.0|^5.0
symfony/config Version ^4.0|^5.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package atk4/i18n contains the following files

Loading the files please wait ....