flokosiol/translations

This package is abandoned and no longer maintained. The author suggests using the daandelange/k3-translations package instead.

Extended translations handling for Kirby CMS

Installs: 48

Dependents: 0

Suggesters: 0

Security: 0

Stars: 46

Watchers: 6

Forks: 4

Open Issues: 2

Language:JavaScript

Type:kirby-plugin

1.0.1 2021-11-27 22:03 UTC

This package is auto-updated.

Last update: 2022-02-11 21:45:57 UTC


README

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:

  • RED: The translated .txt-file does not exist
  • GREEN: The translated .txt-file exists

For all non-default languages you can:

  • delete a translation (without deleting the whole page)
  • resynchronize translations with the default language file

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!