Download the PHP package oorrwullie/yii2-babelfishfood without Composer

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

Babel Fish Food

Language switching companion of the Yii2 Babelfish symbiote. It can also be used as a complete stand alone solution to get i18n support up and running quickly for any site built using the standard Yii2 advanced template.

Key Features

Installation

The preferred way to install this extension is through composer.

Either run

or add

to the require section of your composer.json file.

Configuration

Once the extension is installed :

Create the languages table and add language column to your database:

You select supported languages using the active column for that language in the database. We recommend writing a migration to update your active languages, and turn off any of the default that you are not using.

Configure the component in common/config/main.php:

You need to bootstrap the component for each app you would like translations to work like so: In frontend/config/main.php

Do the same in the backend if you would like to have the switcher there too.

Configure translation extraction:

The i18n section needs to be filled in like so: in common/config/main.php

To use the built-in CRUD to administrate languages, add the following to backend/config/main.php:

Implementation

Designating text to be translated

Wrap text to be translated like so:

To compile translations into po files, navigate to your project toot and run:

The above command is a bit long. There is a bash script in oorrwullie/yii2-babelfishfood named i18n. You can copy that to your project root and update translations by running:

To use the widget in a view:

You can change the label of the dropdown widget (defaults to "Languages: ") and languages can either be normal or uppercase (defaults to uppercase). For example:

To use the CRUD:

Navigate to your backend url + bff like so: www.example.com/backend/bff


All versions of yii2-babelfishfood with dependencies

PHP Build Version
Package Version
Requires yiisoft/yii2 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 oorrwullie/yii2-babelfishfood contains the following files

Loading the files please wait ....