Download the PHP package becklyn/translations without Composer

On this page you can find all versions of the php package becklyn/translations. 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 translations

Becklyn Translations Bundle

This bundle provides several helpers for working with translations.

Installation

First install this package:

Then import the routing:

Configuration

The extract key defines which messages from which domain need to be extracted and dumped for usage in JavaScript. It is a nested array, where the first level key is the namespace (more on that below). The second level key is the translation domain and the values are the message keys. You can use * as a placeholder for the message keys.

The dumped JavaScript is cached. If somehow the cache is busted, you can manually invalidate the cache by bumping the cache_version.

Namespaces

The translations dumps are separated into namespaces, so that there can be for example one dump for frontend translations and one for the backend translations. The namespaces are just labels and are passed to the init function (see the next chapter).

JS Dumper + Loader

This bundle exposes an endpoint that can be used to load translations in JS. Include it in your Twig using the twig function:

It will automatically use the locale of the current master request. To override this behaviour a custom locale can be passed:

Using the Translations

The dumped translations will be added to a global window.TranslatorInit.data object. These are nested maps, the outer map has the domain as key, the inner value is a mapping from key → translation.

Linked translation builder

This bundle provides a LinkedTranslationBuilder that can be used to handle translations that contain links. It can simply be used by using the LinkedTranslationBuilderFactory to create a new instance. Then a list of used links can be added to the LinkedTranslationBuilder. Finally, the LinkedTranslationBuilder is able to create all needed parameters for the translation:

The LinkedTranslationBuilder is also capable of handling links that have custom classes and contain icons.


All versions of translations with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-json Version *
becklyn/cache Version ^1.1.0
becklyn/html-builder Version ^2.2.0
becklyn/icon-loader Version ^2.2.0
becklyn/rad Version ^8.6.0
symfony/config Version ^5.4.3 || ^6.0.3
symfony/dependency-injection Version ^5.4.3 || ^6.0.3
symfony/framework-bundle Version ^5.4.3 || ^6.0.3
symfony/http-kernel Version ^5.4.4 || ^6.0.4
symfony/process Version ^5.4.3 || ^6.0.3
symfony/translation Version ^5.4.3 || ^6.0.3
symfony/translation-contracts Version ^1.1 || ^2.0 || ^3.0.0
twig/twig Version ^3.3.8
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 becklyn/translations contains the following files

Loading the files please wait ....