Skip to main content

Overview

LiveCodes supports multiple languages for the user interface:
  • 20+ languages available
  • Community translations maintained by contributors
  • Auto-detection based on browser settings
  • Easy switching between languages

Supported Languages

LiveCodes UI is available in:

English

en (Default)

Español

es (Spanish)

Français

fr (French)

Deutsch

de (German)

العربية

ar (Arabic)

中文

zh-CN (Chinese Simplified)

繁體中文

zh-TW (Chinese Traditional)

日本語

ja (Japanese)

한국어

ko (Korean)

Português

pt (Portuguese)

Русский

ru (Russian)

Italiano

it (Italian)
And many more…
Language support is community-driven. Translations may vary in completeness.

Changing Language

Automatic Detection

By default, LiveCodes detects your browser’s language:
// Automatically uses browser language
navigator.language // e.g., "es-ES" → Spanish UI

Manual Selection

1

Open Settings

Click MenuApp Settings
2

Select Language

Choose from the language dropdown
3

Apply

UI updates immediately

Via URL Parameter

Force a specific language:
https://livecodes.io/?lang=es
https://livecodes.io/?lang=fr
https://livecodes.io/?lang=zh-CN

Via SDK

Set language programmatically:
import { createPlayground } from 'livecodes';

createPlayground('#container', {
  params: {
    language: 'es' // Spanish UI
  }
});

What Gets Translated

  • Menu items
  • Button labels
  • Dialog boxes
  • Settings panels
  • Error messages
Programming language names and technical terms are generally not translated.

RTL Language Support

Right-to-left languages (Arabic, Hebrew) are fully supported:
// Arabic UI
{ language: 'ar' }

// Automatic RTL layout
// Menus open from right
// Text aligned right
// Proper bidirectional text
RTL support includes:
  • Mirrored UI layout
  • Proper text direction
  • Correct alignment
  • Bidirectional text handling

Language Codes

ISO 639-1 language codes:
CodeLanguage
enEnglish
esSpanish
frFrench
deGerman
arArabic
zh-CNChinese (Simplified)
zh-TWChinese (Traditional)
jaJapanese
koKorean
ptPortuguese
ruRussian
itItalian
nlDutch
plPolish
trTurkish
viVietnamese
hiHindi
bnBengali

Translation System

LiveCodes uses i18next for internationalization:
// Translation keys
translateString('menu.new', 'New')
translateString('menu.save', 'Save')
translateString('console.clear', 'Clear')

Interpolation

Translations support variables:
translateString('share.copy.copied', 'URL copied to clipboard')
translateString('assets.link.type', 'Type: {{type}}', { type: 'Image' })
translateString('backup.error.atLeastOneStore', 'Please select at least one store')

Contributing Translations

1

Find Translation Files

Translations are in the GitHub repo:
src/livecodes/i18n/locales/{language}/
2

Create New Language

Copy English locale and translate:
cp -r locales/en locales/es
# Edit locales/es/translation.json
3

Submit PR

Submit pull request with your translations
Contributing translations helps make LiveCodes accessible to more developers worldwide.

Embedded Playground Language

Set language in embedded playgrounds:
import { createPlayground } from 'livecodes';

createPlayground('#container', {
  params: {
    language: 'fr' // French UI for embed
  }
});
<!-- Via iframe -->
<iframe src="https://livecodes.io/?lang=fr&embed=true"></iframe>

Fallback Behavior

If a translation is missing:
1

Check Selected Language

Look for translation in chosen language
2

Fall Back to English

If not found, use English text
3

Display Default

Show English as last resort
// Example:
// Spanish locale missing a key
translateString('new.feature.title', 'New Feature')
// Falls back to English: "New Feature"

Language Persistence

Your language preference is saved:
  • In browser localStorage
  • Persists across sessions
  • Per-browser setting

Dynamic Language Switching

Change language without reload:
// Via SDK
const playground = await createPlayground('#container');

// Change language
await playground.exec('changeLanguage', 'es');
// UI updates to Spanish immediately

Best Practices

1

Respect User Preference

Use browser language by default:
// Auto-detect (recommended)
{ language: undefined }
2

Provide Language Selector

Allow users to override:
// Show language selector in embed
{ params: { allowLangSelection: true } }
3

Test RTL Languages

If supporting Arabic/Hebrew, test RTL layout

Limitations

  • Not all strings may be translated
  • Some technical terms remain in English
  • Translation quality varies by language
  • Community-maintained translations may lag behind

API Reference

Get Current Language

const lang = await playground.exec('getLanguage');
console.log(lang); // "es"

Change Language

await playground.exec('changeLanguage', 'fr');

Get Language Direction

const dir = await playground.exec('getLanguageDirection');
console.log(dir); // "ltr" or "rtl"

Translation Coverage

Coverage varies by language:
LanguageCoverage
English (en)100% (source)
Spanish (es)~95%
French (fr)~90%
Chinese (zh-CN)~85%
Arabic (ar)~80%
OthersVaries
Community contributions continuously improve coverage.

Troubleshooting

  • Reload the page
  • Clear browser cache
  • Check language code is correct
  • Verify language is supported
  • Translation may be incomplete
  • Check fallback is working
  • Consider contributing translation
  • Report issues on GitHub
  • Check browser supports RTL
  • Verify language code includes RTL

Build docs developers (and LLMs) love