flokosiol / kirby-translations

Translations field for Kirby 2
45 stars 3 forks source link

Kirby Translations (DEPRICATED)


This version of the plugin is depricated and will no longer be maintained!

Thankfully @Daandelange will take care of it in the future, so please check out https://github.com/Daandelange/k3-translations.


Version License Kirby

This plugin enhaces the translation handling of pages for Kirby CMS with the following features:

How it works

The plugin automatically detects if there's a language .txt file for the current page in your content folder and displays additional language tabs. For now there are two possible states:

For all non-default languages you can:

Commercial Usage

This plugin is free but if you use it in a commercial project please consider to.

Installation

Download

Download and extract this repository, rename the folder to translations and drop it into the plugins folder of your Kirby installation. You should end up with a folder structure like this:

site/plugins/translations/

Composer

If you are using Composer, you can install the plugin with

composer require flokosiol/translations

Git submodule

git submodule add https://github.com/flokosiol/kirby-translations.git site/plugins/translations

Setup

Add the following section to your blueprint.

sections:
  translations:
    type: translations

To disable the possibillity to delete language textfiles you can use …

sections:
  translations:
    type: translations
    deletable: false

To disable the possibillity to revert the content of a language textfile to the default language do …

sections:
  translations:
    type: translations
    revertable: false

Of course, you can combine both options.

Known issues

For Kirby 3.5 and before, using the default language switcher in the Panel breaks the display of the actions (delete, revert), but this should be fixed for Kirby 3.6+

License

MIT

It is discouraged to use this plugin in any project that promotes racism, sexism, homophobia, animal abuse, violence or any other form of hate speech.

Credits

Special thanks to all contributors!