Flout Translate Widget Advanced Configuration Guide


Placing the selector yourself Optional

Use the <ft-selector> tag

For full control — inside a menu, header or footer — add data-auto-selector="false" to the loader snippet, then add the <ft-selector> tag once anywhere in your HTML. It will use the languages, colours and behaviour you have configured in the dashboard.

<nav>
  <a href="/">Home</a>
  <a href="/contact">Contact</a>
  <ft-selector></ft-selector>
</nav>
<ft-selector> is a placement marker only. Do not add inline styles to it — use the CSS hooks below instead.

Styling the selector with CSS

Advanced CSS with ::part() not needed

For designers who want to go further, the selector exposes shadow-DOM parts you can target with ::part().

  • ::part(container) — the wrapper around the button and dropdown.
  • ::part(button) — the clickable trigger.
  • ::part(panel) — the dropdown list background.
  • ::part(item) — each language row in the dropdown.
  • ::part(icon) — the icon image, when one is configured.
ft-selector::part(button) {
  font-size: 16px;
  color: blue;
  background-color: #f0f0f0;
  border: 1px solid green;
  padding: 5px;
  border-radius: 5px;
}

ft-selector::part(panel) {
  background: white;
  border: 1px solid #ccc;
  padding: 10px;
  max-height: 200px;
  overflow-y: auto;
}

ft-selector::part(item):hover {
  background: #f5f5f5;
}

URL parameters Reference

Override settings per page load not used

You can override settings for a single page load by adding parameters to the URL. These take priority over your dashboard settings.

ParameterWhat it doesExample
langOpen the page in a specific language.?lang=fr

Language codes Reference

Use these codes when choosing translation languages in the dashboard, translation overrides, or the lang URL parameter.

Show all language codes select languages in your dashboard
CodeLanguage
af🇿🇦 Afrikaans (Afrikaans)
am🇪🇹 አማርኛ (Amharic)
ar🇸🇦 العربية (Arabic)
az🇦🇿 Azərbaycan dili (Azerbaijani)
be🇧🇾 Беларуская (Belarusian)
bg🇧🇬 Български (Bulgarian)
bn🇧🇩 বাংলা (Bengali)
bs🇧🇦 Bosanski (Bosnian)
ca🇪🇸 Català (Catalan)
cs🇨🇿 Čeština (Czech)
cy🏴 Cymraeg (Welsh)
da🇩🇰 Dansk (Danish)
de🇩🇪 Deutsch (German)
el🇬🇷 Ελληνικά (Greek)
en🇬🇧 English (English)
es🇪🇸 Español (Spanish)
et🇪🇪 Eesti (Estonian)
fa🇮🇷 فارسی (Persian)
fi🇫🇮 Suomi (Finnish)
fr🇫🇷 Français (French)
ga🇮🇪 Gaeilge (Irish)
gl🇪🇸 Galego (Galician)
gu🇮🇳 ગુજરાતી (Gujarati)
he🇮🇱 עברית (Hebrew)
hi🇮🇳 हिन्दी (Hindi)
hr🇭🇷 Hrvatski (Croatian)
ht🇭🇹 Kreyòl Ayisyen (Haitian Creole)
hu🇭🇺 Magyar (Hungarian)
hy🇦🇲 Հայերեն (Armenian)
id🇮🇩 Bahasa Indonesia (Indonesian)
is🇮🇸 Íslenska (Icelandic)
it🇮🇹 Italiano (Italian)
ja🇯🇵 日本語 (Japanese)
ka🇬🇪 ქართული (Georgian)
kk🇰🇿 Қазақ тілі (Kazakh)
km🇰🇭 ភាសាខ្មែរ (Khmer)
kn🇮🇳 ಕನ್ನಡ (Kannada)
ko🇰🇷 한국어 (Korean)
ku🇹🇷 Kurdî (Kurdish)
lt🇱🇹 Lietuvių kalba (Lithuanian)
lv🇱🇻 Latviešu valoda (Latvian)
mi🇳🇿 Te Reo Māori (Maori)
mk🇲🇰 Македонски (Macedonian)
ml🇮🇳 മലയാളം (Malayalam)
mn🇲🇳 Монгол хэл (Mongolian)
mr🇮🇳 मराठी (Marathi)
ms🇲🇾 Bahasa Melayu (Malay)
mt🇲🇹 Malti (Maltese)
my🇲🇲 မြန်မာစာ (Burmese)
ne🇳🇵 नेपाली (Nepali)
nl🇳🇱 Nederlands (Dutch)
no🇳🇴 Norsk (Norwegian)
pa🇮🇳 ਪੰਜਾਬੀ (Punjabi)
pl🇵🇱 Polski (Polish)
ps🇦🇫 پښتو (Pashto)
pt🇵🇹 Português (Portuguese)
ro🇷🇴 Română (Romanian)
ru🇷🇺 Русский (Russian)
sk🇸🇰 Slovenčina (Slovak)
sl🇸🇮 Slovenščina (Slovenian)
sm🇼🇸 Gagana Samoa (Samoan)
so🇸🇴 Soomaali (Somali)
sq🇦🇱 Shqip (Albanian)
sr🇷🇸 Српски (Serbian)
su🇮🇩 Basa Sunda (Sundanese)
sv🇸🇪 Svenska (Swedish)
sw🇹🇿 Kiswahili (Swahili)
ta🇮🇳 தமிழ் (Tamil)
te🇮🇳 తెలుగు (Telugu)
th🇹🇭 ไทย (Thai)
to🇹🇴 Lea fakatonga (Tongan)
tr🇹🇷 Türkçe (Turkish)
ug🇨🇳 ئۇيغۇرچە (Uyghur)
uk🇺🇦 Українська (Ukrainian)
ur🇵🇰 اردو (Urdu)
uz🇺🇿 Oʻzbekcha (Uzbek)
vi🇻🇳 Tiếng Việt (Vietnamese)
xh🇿🇦 isiXhosa (Xhosa)
yi🇮🇱 ייִדיש (Yiddish)
yo🇳🇬 Yorùbá (Yoruba)
yu🇭🇰 廣東話 (Cantonese - Hong Kong / Macau)
zh🇨🇳 简体中文 (Simplified Chinese - Mainland)
zt🀄️ 繁體中文 (Traditional Chinese - Hong Kong / Taiwan / Macau)
zu🇿🇦 isiZulu (Zulu)