nlybe / lang_selector
Provides a selector for users to easily change the language. Revised version from original Language Selector plugin by ColdTrick.
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:elgg-plugin
Requires
- php: >=7.4
- composer/installers: ^1.0.8
Conflicts
- coldtrick/language_selector: *
- elgg/elgg: <5.0
README
Provides a language selector view to use in your themes.
If you are using a default theme, there is an admin option to extend the header with the language selector.
Check the admin settings of the plugin for things to configure.
This plugin based on Language Selector by ColdTrick. The main difference is that the the flags selection is based on "Allowed languages" as have been checked in Site Settings and not in "Minimum language completeness" as in original plugin.
Features
- display flags for "Allowed languages" as have been checked in Site Settings
- language_selector/default view to use in themes
- handles translation preferences for logged in (user preferences) AND non logged in users (cookies)
- incorporated autodetection of browser language (only for non logged in users)
- language selector display country codes or flags
- option to add language prefix in URL paramas, e.g. /en/blog
Notes
- To add a language selector in a custom position, use
elgg_view('language_selector/default')
- To display a language selector with a dropdown, use
elgg_view('language_selector/dropdown')
- To add a custom language icon or replace an existing one, add an image file (svg, jpg, png, gif) in your plugin under
/views/default/language_selector/flags/$language_code.$ext
.