Language switcher plugin

Installation

composer require wirelab/language_switcher-plugin

Manual installation

Make sure to replace <namespace> with your own namespace. This is the name of the folder under /addons1. In your terminal navigate to your project root2. mkdir addons/<namespace>/wirelab2. cd addons/<namespace>/wirelab3. git clone https://github.com/wirelab/language_switcher-plugin.git

The current variables contain data about the locale that's currently in usecurrent.localecurrent.countrycurrent.language

The prefered variables contain data about the user.prefered.localeprefered.enabledChecks if the users language is available/enabled.prefered.urlUrl to the current page in the users locale.prefered.countryprefered.language

Array $options (optional)

The $options array accepts the following options:container_classtoggle_classtoggle_titleWhen no title is given the current locale will be usedul_classli_classa_class