npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

netlify-cms-widget-i18n

v1.0.17

Published

A Netlify CMS widget to edit and manage i18n files

Downloads

53

Readme

netlify-cms-widget-i18n

A custom Netlify CMS widget for editing i18n files.

npm version

This is a widget to handle your internationalization files with Netlify CMS that you can use for your MIT projects. This widget uses the awesome table component Handsometable on its Non-commercial version.

Once installed, you will have a widget to manage your key-value internazionalization JSON files with: -Key duplicate detection -Copy/paste capable -Insert/delete rows -Search and filter the content for large files

GIF

Here's an animation of the CMS widget.
Screenshot gif

Installation

As an npm package:

yarn add netlify-cms-widget-i18n

or

npm install --save netlify-cms-widget-i18n
import NetlifyCmsWidgetI18n from 'netlify-cms-widget-i18n'

CMS.registerWidget('I18n', I18nControl, I18nPreview)

Usage

Add to your Netlify CMS configuration a collection per language that you want to support with your i18n files.
A field named title is required to be able to give the JSON file a name when creating new ones, and also a prop named title will have this value inside the i18n JSON file itself.
A second field with widget: 'i18n' will be the widget itself, the field name inside this one will be the name of the prop inside the JSON file.
If name: "en" then the i18n JSON file will be

{
  "en": {
    "MY_KEY": "My literal in english"
  }
}

For example, English and Spanish can be configured like:

collections:
  - name: "english-i18n-file"
    label: "English files"
    folder: "content/i18n/en"
    extension: json
    create: true
    editor:
      preview: false
    fields:
      - {label: "Title", name: "title", widget: "string"}
      - {label: "i18n content", name: "en", widget: "i18n", pattern: ['^(?!.*\.json$).*$','A JSON file name can have no spaces or special characters']}
  - name: "spanish-i18n-file"
    label: "Spanish files"
    folder: "content/i18n/es"
    extension: json
    create: true
    editor:
      preview: false
    fields:
      - {label: "Title", name: "title", widget: "string"}
      - {label: "i18n content", name: "es", widget: "i18n", pattern: ['^(?!.*\.json$).*$','A JSON file name can have no spaces or special characters']}

Support

For help with this widget, open an issue