Skip to content
This repository has been archived by the owner on Jun 8, 2024. It is now read-only.

Pack multiple languages into one page

Ejaz edited this page Feb 24, 2021 · 1 revision

To put multiple languages into one page is as simple as defining a variable.

To get a glimpse of how our language and string engine works, this is how your strings JSON should be structured.

var flsestrings = { "hello":{ "default": "Hello", "es": "Hola", "fr": "Bonjour", "ja": "こんにちわ" } }

Keep in mind what the string tag is as you'll need to make a flsestring attribute on any element that needs it. For example:

<p flsestring="hello"></p>:

Output (en): <p>Hello</p> Output (fr): <p>Bonjour</p>

Override Browser Language

You can override the browser language by adding a <locale> tag with an attribute called value set to the locale you want to override to. For example:

<locale value="ja"></locale>