croox/language-selector

A Statamic addon for selecting languages in Bard fields

Installs: 3

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Language:JavaScript

Type:statamic-addon

v1.0.1 2025-01-24 12:25 UTC

This package is auto-updated.

Last update: 2025-03-24 12:51:21 UTC


README

A Statamic addon that adds language selection functionality to Bard fields.

Features

  • Adds a language selector button to Bard fields
  • Wraps selected text in a <span lang="..."> tag

Limitations

  • Available languages are currently hard-coded

Installation

You can install the package via composer:

composer require croox/language-selector

Usage

  1. The language selector button will appear in your Bard field toolbar
  2. Select the text you want to mark with a language
  3. Click the language button and select the appropriate language
  4. The text will be wrapped in a <span> tag with the correct lang attribute

Development

  1. Clone this repository
  2. Run npm install
  3. Run npm run build

License

MIT License