Download the PHP package kunstmaan/translator-bundle without Composer

On this page you can find all versions of the php package kunstmaan/translator-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 translator-bundle

KunstmaanTranslatorBundle

Build Status Total Downloads Latest Stable Version Analytics

A bundle which enables editing translations in the admin interface without need for editing the translations files. Translations will be stored in a (default) database and retrieved on the most efficient way possible.

Symfony Profiler Example

Installation requirements

You should be able to get Symfony >=2.3 up and running before you can install the KunstmaanTranslatorBundle.

Installation instructions

Assuming you have installed composer.phar or composer binary:

Add the KunstmaanTranslatorBundle to your AppKernel.php file:

Add the KunstmaanTranslatorBundle to your routing.yml. Take your own routing into account, it's possible you will need to add the following code prior to your own routing configurations

Configuration

Overwrite the KunstmaanTranslatorBundle config to your needs in config.yml, these are the default values:

Example configurations:

Database schema

Update your database schema with doctrine

Migrate dev translations to production

Use the following command to generate a doctrine migration with all new and updated translations from your current environment.

When you want to include these migrated translations into your (other) environment use the normal doctrine migrate command.

Import existing translation files

When migrating your current project you can easily import the existing translation files.

Without parameters, all translations, locales from the current main project will be included. If you have already existing translations in the database with the same combination of 'domain', 'keyword', 'locale', non of them will be overwritten

To force overwrite the existing translations in the stasher:

To import translations from a specific bundle:

To import only specific locales:

To import translations from the global Resources (app/Resources/translations)

How does the cache work

Translations are stored in a database, but cached (as Symfony normally does) when not running in debug mode.

When editing translations in the backend changes aren't immediately visible on your website. The backend will show a warning message when not newer or updated translations aren't loaded into the cache. Click on the Refresh live button to rebuild the cache.

Clear cache and request status

Clear translation cache files, this will trigger a rebuild of the translation cache when visiting a page

Request status of the current cache

Reset translation flags

When all translations are up to date, e.g when migrated all develop translations into production. You need to reset all the flags which mark translations as new or updated. Otherwise already migrated translations will be added into later migrations again (which can cause errors with inserts and unique keys)

Lookup keyword/domain of your translations

You probably don't always remember which keyword and/or domain your translations on specific pages are using. To solve this problem you can add an extra GET parameter to your request. Add ?transSource=1 to your url to see all sources of the translated labels.

You instead of "Hello world" you might see header.hello_world (messages). This means:

Symfony Profiler integration

The Symfony Profiler show the number of translations used on the current request:

Symfony Profiler Example

When you click on this item, you can see all translations used on the current request and a link to add or edit them in the Kunstmaan Admin backend.

Symfony Profiler Example Table

Workflow example (new project)

  1. Add translations (with keywords) in your template files (dev)
  2. Add the translations of (1) into your backend via "Add Translation" (dev)
  3. Repeat 1 & 2
  4. Create migrations diff bin/console kuma:translator:migrations:diff (dev)
  5. Reset translation flags bin/console kuma:translator:flag --reset (dev)
  6. Deploy your application
  7. Execute doctrine migrations bin/console doctrine:migrations:migrate (prod)
  8. Edit/add translations (prod)
  9. When ready editing/adding, click Refresh live or bin/console kuma:translator:cache --flush (prod)
  10. Repeat 7 & 8 when editing/adding translations in prod

Workflow example (existing project)

  1. Import current translations, click Import -> Import or bin/console kuma:translator:import (prod/dev)
  2. If you did 1 in dev, go to 4 of "Workflow example (new project)", otherwise go to 7 "Workflow example (new project)"

Features

Development instructions

Run unit tests

Run PHP CS Fixer, after installing php-cs-fixer system wide

How to create your own file exporter

NOTE : exporting isn't stable (yet)


All versions of translator-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
kunstmaan/adminlist-bundle Version ^7.0
openspout/openspout Version ^4.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 kunstmaan/translator-bundle contains the following files

Loading the files please wait ....