/fluent-web

A web component for using projectfluent.org/

Primary LanguageJavaScriptMIT LicenseMIT

fluent-web

A web component that uses Project Fluent for localization.

Interactive example.

Locale en-US Locale pl
example result locale en-US example result locale pl

Basic Usage:

JavaScript is just one way to make messages

import flt from "@fluent/dedent";

const messages = [
  "en-US",
  flt`
  hello = Hello, Fluent!
  `,
];

HTML:

<fluent-text messages="messages" messageId="hello"></fluent-text>

Result:

Hello, Fluent!

For how to build messages, see the Fluent docs.

Examples:

Other:

Note: No npm package is published yet so feel free to clone this repo or the clone src/index.js until then.

⚠️ WARNING ⚠️ This project is still in development and APIs are subject to change.

See the Docs for more details.