@dbp-toolkit/language-select

0.3.2 • Public • Published

Language Select Web Component

You can install this component via npm:

npm i @dbp-toolkit/language-select

Usage

<dbp-language-select></dbp-language-select>
<script type="module" src="node_modules/@dbp-toolkit/language-select/dist/dbp-language-select.js"></script>

Or directly via CDN:

<dbp-language-select></dbp-language-select>
<script type="module" src="https://unpkg.com/@dbp-toolkit/language-select@0.2.2/dist/dbp-language-select.js"></script>

Attributes

  • lang (optional, default: de): set to de or en for German or English (note that it will be shown the other way around to make it easier to switch to a different language)
    • example <dbp-language-select lang="de"></dbp-language-select>

Emitted attributes

The component emits dbp-set-property events for these attributes:

  • lang to propagate a language change (possible values en, de)

Local development

# get the source
git clone git@github.com:digital-blueprint/toolkit.git
cd toolkit/packages/language-select

# install dependencies
yarn install

# constantly build dist/bundle.js and run a local web-server on port 8002 
yarn run watch-local

# build local packages in dist directory
yarn run build

Readme

Keywords

none

Package Sidebar

Install

npm i @dbp-toolkit/language-select

Weekly Downloads

6

Version

0.3.2

License

LGPL-2.1-or-later

Unpacked Size

748 kB

Total Files

23

Last publish

Collaborators

  • lazka
  • pbek
  • dbp-deploy