Download the PHP package sjaakp/yii2-polyglot without Composer

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

yii2-polyglot

Ultralight language chooser for Yii2

Latest Stable Version Total Downloads License

yii2-polyglot is an application component plus two widgets with flag buttons to choose the application language. It can be used in the Yii 2.0 PHP Framework.

yii2-polyglot was developed as an alternative to other language choosers, which in my opinion are often overly complex.

yii2-polyglot lets the user choose her favourite language by clicking on a flag button. The chosen language becomes the site's main language and is stored in a cookie.

A demonstration of Yii2-polyglot is here.

Installation

Install yii2-polyglot in the usual way with Composer. Add the following to the require section of your composer.json file:

"sjaakp/yii2-polyglot": "*"

or run:

composer require sjaakp/yii2-polyglot

You can manually install yii2-polyglot by downloading the source in ZIP-format.

Using yii2-polyglot

First of all, Polyglot should be installed as an application component. This is done in the main configuration file, usually called web.php or main.php in the config directory. Add the following to the configuration array:

...
<?= PolyglotButtons::widget() ?>;
...

Or:

...
<?= PolyglotDropdown::widget() ?>;
...

As you will most likely want to have the Polyglot widget on all of your pages, the preferable place for a widget would be the layout viewfile (or one of the layout viewfiles).

Widget options

PolyglotButtons and PolyglotDropdown have the following options:


All versions of yii2-polyglot with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
yiisoft/yii2 Version ~2.0.14
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 sjaakp/yii2-polyglot contains the following files

Loading the files please wait ....