Download the PHP package clash82/ezplatform-website-switcher without Composer
On this page you can find all versions of the php package clash82/ezplatform-website-switcher. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download clash82/ezplatform-website-switcher
More information about clash82/ezplatform-website-switcher
Files in clash82/ezplatform-website-switcher
Package ezplatform-website-switcher
Short Description Adds option to suggest to the user to visit your website in another language. This bundle uses the main language of the browser in order to redirect to the correct site.
License MIT
Homepage https://github.com/clash82/ezplatform-website-switcher
Informations about the package ezplatform-website-switcher
eZ Platform Website Switcher
With this bundle, you can suggest to the user to visit your website in another language. This bundle uses the main language of the browser in order to redirect to the correct site.
Requirements
- Symfony v2.6 or later
- eZ Publish 5.4 / eZ Platform 1.x or later
Installation
This package is available via Composer, so the instructions below are similar to how you install any other open source Symfony Bundle.
Run the following command in a terminal, from your Symfony installation root (pick most recent release):
Enable the bundle in app/AppKernel.php
file:
Add external assets to your bundle:
-
CSS:
- JS:
If you are installing bundle via composer require
you must also copy assets to your project web
directory. You can do this by calling Symfony built-in command from the project root directory:
Configuration
This is an example of required settings (config.yml):
Supported languages are detected from your eZ Publish / eZ Platform installation.
Usage
Insert the following {{ show_website_switcher_banner() }}
helper somewhere in your header template close after body opening tag.
The following optional parameters can be set as an argument in an array format (overrides default settings and parameters from config.yml
file):
Parameter | Default value | Description |
---|---|---|
cookieName | websiteSwitcherStatus | Sets your own status cookie name |
days | 365 | Says how many days website switcher banner should be hidden when user disables the banner |
Example of usage in standard eZ Publish / eZ Platform application:
or