Version 0.1
In a multi language installation of the panel, the language code shows the current language. Because there is no visual element (only letters) it can be easy to accidentally save the content in the wrong language.
This plugin adds flags as a complement to the language code.
Use one of the alternatives below.
If you are using the Kirby CLI you can install this plugin by running the following commands in your shell:
$ cd path/to/kirby
$ kirby plugin:install jenstornell/kirby-panel-flags
- Clone or download this repository.
- Unzip the archive if needed and rename the folder to
kirby-panel-flags
.
Make sure that the plugin folder structure looks like this:
site/plugins/kirby-panel-flags/
If you know your way around Git, you can download this plugin as a submodule:
$ cd path/to/kirby
$ git submodule add https://github.com/username/kirby-panel-flags site/plugins/kirby-panel-flags
To make it work as expected, add the following code to your blueprint:
fields:
flags:
type: flags
This option can be set in your /site/config/config.php
file:
c::set('plugin.flags.filenames', array(
'en' => 'gb'
));
If the language code does not match the filename, you can use this option.
- The key
en
in the example is the language code. - The value
gb
in this example is the filename without extension.
For a full list of filenames, look here:
https://github.com/lipis/flag-icon-css/tree/master/flags/4x3
Because en
is really common and does not exist as filename it defaults to gb
.
0.1
- Initial release
- Kirby 2.3+
This plugin is provided "as is" with no guarantee. Use it at your own risk and always test it yourself before using it in a production environment. If you find any issues, please create a new issue.
- Kirby Panel Flags - MIT
- flag-icon-css - MIT