Download the PHP package tonchik-tm/yii2-translate-manager without Composer

On this page you can find all versions of the php package tonchik-tm/yii2-translate-manager. 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 yii2-translate-manager

Yii2 - Translate Manager

Online Translations

Introduction

This module provides a simple translating interface for the multilingual elements of your project. It can auto-detect new language elements (project scan). Duplications are filtered out automatically during project scanning. Unused language elements can be removed from the database with a single click (database optimisation) and translations can be imported and exported. It is possible to translate client side messages too (those stored in JavaScript files) as the project scan collects language elements to be translated from JavaScript files as well.

It also allows you to translate text on the client side (on the live webpage) without having to log in to the translating interface. (frontendTranslation).

On the server side it can handle database or one-dimensional/multidimensional array elements and Yii::t functions. You can exclude files, folders or categories to prevent them from being translated.

Installation

The preferred way to install this extension is through composer.

Either run

or add

to the require section of your composer.json file.

Migration

Run the following command in Terminal for database migration:

Linux/Unix:

Windows:

Config

A simple exmple of turning on Yii database multilingual.

Turning on the TranslateManager Module:

Simple example:

A more complex example including database table with multilingual support is below:

IMPORTANT: If you want to modify the value of roles (in other words to start using user roles) you need to enable authManager in the common config.

Using of authManager.

examples:

PhpManager:

DbManager:

Front end translation:

Usage

Register client scripts

To translate static messages in JavaScript files it is necessary to register the files.

To register your scripts, call the following method in each action:

A simple example for calling the above method at each page load:

ToggleTranslate button

Simple example for displaying a button to switch to front end translation mode. (The button will only appear for users who have the necessary privileges for translating!)

A more complex example for displaying the button:

Placing multilingual elements in the source code.

JavaScript:

PHP methods:

PHP functions for front end translation:

PHP arrays:

PHP Database:

URLs

URLs for the translating tool:

Example implementation of the Yii2 menu into your own menu.

Console commands

Register the command

Use it with the Yii CLI

Screenshots

List of languages

translate-manager-0 2-screen-1

Scanning project

translate-manager-0 2-screen-2

Optimise database

translate-manager-0 2-screen-3

Translate on the admin interface

translate-manager-0 2-screen-4

Front end in translating mode

translate-manager-0 2-screen-6

Translate on the front end

translate-manager-0 2-screen-7

Links


All versions of yii2-translate-manager with dependencies

PHP Build Version
Package Version
Requires yiisoft/yii2 Version *
yiisoft/yii2-jui Version *
yiisoft/yii2-bootstrap Version *
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 tonchik-tm/yii2-translate-manager contains the following files

Loading the files please wait ....