npm

Don't miss out on this year's npm Pride t-shirt designs!Order your favorites here »

gitbook-plugin-language-picker

0.1.0 • Public • Published

GitBook Plugin: Language Picker

Usage

  1. Update plugins in book.json file to include language-picker plugin.
{
    "plugins": [
        "language-picker"
    ]
}
  1. Run gitbook install in console to install plugins.

  2. You'll find "globe" icon in toolbar.

How this works

Click that icon, dropdown menu will show you a grid with references to all languages that you set in root file LANGS.md.

Access to ../index.html ("Select language" page) required, so don't try to retrieve languages locally yet.

After selecting language browser will be moved to translated version of current page.

Configuration

You can set:

  • Columns count of languages grid (grid-columns) - (default: 3).

Add into book.json

    "pluginsConfig": {
        "language-picker": {
            "grid-columns": 3
        }
    }

Why it's not using flags?

There is dialect and also country division. So I don't want to split languages on both; you can read other good information about it and think about that doing it or not yourself.

install

npm i gitbook-plugin-language-picker

Downloadsweekly downloads

1,127

version

0.1.0

license

MIT

last publish

collaborators

  • avatar
Report a vulnerability