2017 © Pedro Peláez
 

streams-addon language_switcher-plugin

A plugin providing users with numerous ways of switching language.

image

wirelab/language_switcher-plugin

A plugin providing users with numerous ways of switching language.

  • Friday, February 23, 2018
  • by Wirelab
  • Repository
  • 1 Watchers
  • 0 Stars
  • 323 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 9 Versions
  • 13 % Grown

The README.md

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., (*1)

Installation

composer require wirelab/language_switcher-plugin

Usage

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

String $type

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

Default types

Li

, (*4)

, (*5)

The modal makes a cookie when dismissed., (*6)

, (*7)

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., (*8)

The following variables are passed to all views:
container.class
toggle.class
ul.class
li.class
a.class
, (*9)

toggle.title
, (*10)

locales _array of all available locales formated like: [[url => locale],[url => locale]]_
, (*11)

The current variables contain data about the locale that's currently in use
current.locale
current.country
current.language
, (*12)

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
, (*13)

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)
, (*14)

The Versions

23/02 2018

dev-master

9999999-dev http://wirelab.nl/

A plugin providing users with numerous ways of switching language.

  Sources   Download

MIT

language pyrocms language switcher wirelab pyrocms 3

28/11 2017

1.3

1.3.0.0 http://wirelab.nl/

A plugin providing users with numerous ways of switching language.

  Sources   Download

MIT

language pyrocms language switcher wirelab pyrocms 3

24/08 2017

1.2.1

1.2.1.0 http://wirelab.nl/

A plugin providing users with numerous ways of switching language.

  Sources   Download

MIT

language pyrocms language switcher wirelab pyrocms 3

06/07 2017

1.2.0

1.2.0.0 http://wirelab.nl/

A plugin providing users with numerous ways of switching language.

  Sources   Download

MIT

language pyrocms language switcher wirelab pyrocms 3

25/04 2017

1.1.1

1.1.1.0 http://wirelab.nl/

A plugin providing users with numerous ways of switching language.

  Sources   Download

MIT

language pyrocms language switcher wirelab pyrocms 3

30/03 2017

1.x-dev

1.9999999.9999999.9999999-dev http://wirelab.nl/

A plugin providing users with numerous ways of switching language.

  Sources   Download

MIT

language pyrocms language switcher wirelab pyrocms 3

30/03 2017

1.1.0

1.1.0.0 http://wirelab.nl/

A plugin providing users with numerous ways of switching language.

  Sources   Download

MIT

language pyrocms language switcher wirelab pyrocms 3

13/03 2017

1.0.1

1.0.1.0 http://wirelab.nl/

A plugin providing users with numerous ways of switching language.

  Sources   Download

MIT

language pyrocms language switcher wirelab pyrocms 3

10/03 2017

1.0.0

1.0.0.0 http://wirelab.nl/

A plugin providing users with numerous ways of switching language.

  Sources   Download

MIT

language pyrocms language switcher wirelab pyrocms 3