Download the PHP package wirelab/language_switcher-plugin without Composer

On this page you can find all versions of the php package wirelab/language_switcher-plugin. 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 language_switcher-plugin

Language switcher plugin

⚠️ This repository has been deprecated ⚠️

A PyroCMS 3 plugin providing users with numerous ways of switching language. The default types use bootstrap 3.

Installation

Usage

Call {{ languageSwitcher($type, $options) }} in the desired twig file.
For example {{ languageSwitcher('dropdown', {'toggle_title':'Choose language'}) }}

String $type

The default types are dropdown,modal, and li. When using the modal type make sure to call it after loading jQuery.

Default types

Li

Dropdown

Modal

The modal makes a cookie when dismissed.

Making a new type

New types can be made by adding a view under <plugin path>/resources/views/. When making a new view it'll automatically add it as a type.

The following variables are passed to all views:
container.class
toggle.class
ul.class
li.class
a.class

toggle.title

locales array of all available locales formated like: [[url => locale],[url => locale]]

The current variables contain data about the locale that's currently in use
current.locale
current.country
current.language

The prefered variables contain data about the user.
prefered.locale
prefered.enabled Checks if the users language is available/enabled.
prefered.url Url to the current page in the users locale.
prefered.country
prefered.language

Array $options (optional)

The $options array accepts the following options:
container_class
toggle_class
toggle_title When no title is given the current locale will be used
ul_class
li_class
a_class
pecl Opt out of usign PECL ( Will remove some features)


All versions of language_switcher-plugin with dependencies

PHP Build Version
Package Version
No informations.
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 wirelab/language_switcher-plugin contains the following files

Loading the files please wait ...