lion/packages/localize/stories/15-text.stories.mdx
Thomas Allmer 89b835a799 feat: improved storybook demos
Co-authored-by: Joren Broekema <Joren.Broekema@ing.com>
Co-authored-by: Alex Ghiu <Alex.Ghiu@ing.com>
Co-authored-by: Thijs Louisse <Thijs.Louisse@ing.com>
2020-01-13 13:58:03 +01:00

20 lines
609 B
Text

import { Story, Meta, html } from '@open-wc/demoing-storybook';
import { render } from '@lion/core';
import { localize, formatNumber, formatDate } from '../index.js';
<Meta title="Localize/Text" />
<Story name="Default"></Story>
# Localize
Is meant to translate text into multiple languages.
In it's simplest form it is a function that returns the translated text for a namespace + key.
<Story id="localize-system-internals--as-function" />
```js
localize.msg('lit-html-example:body'); // for en-GB: I am from England
localize.msg('lit-html-example:body'); // for nl-NL: Ik kom uit Nederland
// ...
```