Overview

The Languages management page in the admin panel lets you control which languages are available on your website, set the default language, and manage the display order. This article covers all the language management features.

The languages list

Go to Settings → Languages to see all your installed languages. The table shows:

ColumnDescription
CodeThe ISO 639-1 language code (e.g., en, fr, de).
NameThe English name of the language.
Native NameThe name in the language's own script (shown in the language switcher).
DirectionLTR (Left-to-Right) or RTL (Right-to-Left).
StatusActive or inactive. Only active languages appear on the front-end.
DefaultIndicates whether this is the default language.
ActionsEdit, Set as Default, or Delete.

Setting the default language

The default language is used when:

  • A visitor accesses a URL without a language prefix (e.g., https://yoursite.com/about).
  • No language preference can be detected from the visitor's browser or location.
  • A translation is not available in the requested language; the default language is used as a fallback.

To change the default language

  1. Go to Settings → Languages.
  2. Click "Set as Default" next to the language you want.
  3. The change takes effect immediately.
Note: Only one language can be the default. Setting a new default automatically unsets the previous one. The default language must always be active; you cannot deactivate it.

Activating and deactivating languages

Deactivating a language

When you deactivate a language:

  • It is removed from the front-end language switcher: visitors can no longer select it.
  • URLs with that language prefix will no longer resolve.
  • The language's translation files are preserved: nothing is deleted.
  • Translatable content (pages, portfolio items, etc.) in that language remains in the database.

This is useful when you want to temporarily hide a language (e.g., while working on translations) without losing any data.

Reactivating a language

Simply edit the language and check the "Active" checkbox. All translations and content instantly become available again.

Important: You cannot deactivate the default language. To deactivate it, first set a different language as the default.

URL behavior with languages

Larapen uses URL prefixes to identify the active language:

https://yoursite.com/about          ← Default language (prefix optional)
https://yoursite.com/fr/a-propos    ← French version
https://yoursite.com/de/ueber-uns   ← German version

Default language URL prefix

You can choose whether the default language shows its code in URLs:

SettingDefault Language URLOther Language URL
Prefix removed (recommended)/about/fr/a-propos
Prefix visible/en/about/fr/a-propos

To configure this:

  1. Go to Settings → General (Localization section).
  2. Find the "Remove Default Locale Prefix" option.
  3. Enable it to hide the default language code from URLs (cleaner URLs).
  4. Disable it to always show the language code for all languages (consistent pattern).

Language switcher

The front-end language switcher is automatically shown in the website header/navigation when two or more active languages exist. It displays each language's native name and optional flag icon.

When a visitor switches language:

  • The URL is updated to include the correct language prefix.
  • If the current page has a translated version (e.g., a page with a translated slug), the visitor is taken to the translated URL.
  • If no translation exists, the visitor sees the default language's content.

Translatable content

Larapen's content models (pages, portfolio items, menu items, categories, etc.) support per-language translations for most text fields. When editing content in the admin panel:

  • You'll see language tabs at the top of translatable fields.
  • Switch between tabs to enter content in each language.
  • The slug can also be translated; each language can have its own URL-friendly slug.
  • Fields left empty in a language will fall back to the default language's content.

Synchronizing and translating

The Languages management page provides two powerful tools for keeping your translations up to date:

Sync Translation Files

Click "Sync Translation Files" to synchronize all translation keys across languages. This operation:

  • Adds any new keys that exist in English but are missing from your other language files.
  • Removes any obsolete keys that no longer exist in English files.
  • Preserves all your existing translations.
  • Processes both core translation files and add-on translation files.
Tip: Run "Sync Translation Files" after every Larapen update or add-on installation to ensure all translation keys are up to date.

AI-Powered Translation

Click the "AI Translate" button next to any language to batch translate all of its files using the configured AI provider. This translates both core and add-on translation files in a single operation.

The AI translation requires a provider to be configured in Settings → AI (e.g., OpenAI, Anthropic, Google). While AI translations provide an excellent starting point, we recommend reviewing them for accuracy.

Display order

The position field controls the display order of languages in:

  • The admin languages list
  • The front-end language switcher
  • Language tabs in content editing forms

Lower numbers appear first. To reorder, edit each language and adjust the position value.

Was this article helpful?

Thank you for your feedback!

Still need help? Create a support ticket

Create a Ticket