Download the PHP package arxy/entity-translations-bundle without Composer

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

EntityTranslationsBundle

Build Status

codecov

Very simple bundle that allows you to translate your entities.

Installation:

it is recommented to install X.Y.* version - This project follow semver - Patch versions will be always compatible with each other. Minor versions may contain minor BC-breaks.

No configuration is needed. Current and fallback locales are taken from Symfony:

Symfony Translations
How to Work with the User's Locale

Example entities:

Language

News.php

NewsTranslations.php

Then you can translate them on yourself

Internal API:

If you wish to change language of all managed entities:

You can change language of single entity:

$initializedLocale is actual locale initialized in entity - it's not necessary to be bg, it could be one of fallback locales. Argument #2 can be either string locale or Language entity.

You can detach entity from manager

So it won't be affected by locale changing.

If you wish to get single translation without initialize it, you can use:

Argument #2 can be either string locale or Language entity.

You can also use translator to translate objects instead of using setCurrentTranslation.

Argument #3 is optional. If omitted current locale is assumed.

You can also use class instead of key for accessing service:

You can also use embedded Twig filters to translate in twig:

or get the whole translation:

Using form to easily translate entities.

Translatable should have addTranslation, removeTranslation ( see by-reference and How to Work with Doctrine Associations / Relations ):

Translation should implements EditableTranslation instead of simple Translation

Load form theme (optionally)

Use '@ArxyEntityTranslations/bootstrap_3_tab_layout.html.twig' for Bootstrap 3 support.

You need to create translation's form.

And then you can:

in your main form.

It's important to include required in entry_language_options for specific locales, because validation is triggered only when language is not empty or it's required.

Language is assumed as not empty when at least one of the fields are filled in.


All versions of entity-translations-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2
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 arxy/entity-translations-bundle contains the following files

Loading the files please wait ....