1.6.1 • Published 6 days ago

@websolutespa/payload-plugin-localization v1.6.1

Weekly downloads
-
License
MIT
Repository
github
Last release
6 days ago

@websolutespa/payload-plugin-localization

npm version

status alpha

Localization plugin for PayloadCms.

Payload Localization Plugin

A plugin for Payload CMS that automatically adds UI components to manage content localizations at the level of a single localizable field without having to change the document display language every time.

Requirements:

  • Payload CMS version 1.2.1 or higher is required.

Installation

npm i @websolutespa/payload-plugin-localization

Usage

import { buildConfig } from 'payload/config';
import { localization } from '@websolutespa/payload-plugin-localization';
import '@websolutespa/payload-plugin-localization/dist/index.css';

export default buildConfig({
  plugins: [
    localization(),
    // The rest of your plugins config goes here
  ],
});

Plugin options

No options available to configure the plugin.

Features

The plugin only affects fields configured via the Payload collections configuration with localized: true and automatically adds:

  • A sticky component at the top of document with the locale selector to easily switch locales (for all collections even if they do not contain localized fields).
  • A "Change localization" button to instantly understand which field are localized and access the localization feature.
  • A modal that allows you to edit the existing localizations and insert new ones. The localization in the reference language (current document locale) is always visible to facilitate the translation. You can save all changed localizations at once as drafts or publish them directly.

Note: In order to open the localization modal the document must be saved at least once. Before that, the message "Save document to enable localizations" will appear on the modal opening button.

Screenshots

PayloadLocalizationPlugin


this library is for internal usage and not production ready
1.6.1

6 days ago

1.6.0

1 month ago

0.1.0

8 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.5

9 months ago

0.0.4

10 months ago

0.0.1

11 months ago