Skip to content
ESC

Searching...

Quick Links

Type to search • Press to navigate • Enter to select

Keep typing to search...

No results found

No documentation matches ""

Languages & Translations.

Manage supported languages, translations, and default locales.

Jan 2, 2026

Reward Loyalty is designed to be global. It supports multiple languages and automatically detects a visitor's preferred language based on their browser settings. You can easily manage active languages, add new translations, and configure text direction.

Available Languages

The platform includes 11 pre-built translations:

Code Language Direction Status
en_US English (United States) LTR Active by default
de_DE German (Germany) LTR Inactive by default
es_ES Spanish (Spain) LTR Inactive by default
fr_FR French (France) LTR Inactive by default
id_ID Indonesian (Indonesia) LTR Inactive by default
it_IT Italian (Italy) LTR Inactive by default
ja_JP Japanese (Japan) LTR Inactive by default
pl_PL Polish (Poland) LTR Inactive by default
pt_BR Portuguese (Brazil) LTR Inactive by default
tr_TR Turkish (Turkey) LTR Inactive by default
ar_SA Arabic (Saudi Arabia) RTL Inactive by default

RTL Support: Arabic includes full right-to-left support. All interface elements automatically adjust for RTL languages.


How It Works

The platform uses a folder-based structure for languages. Each language lives in its own directory within lang/ (e.g., lang/en_US/, lang/pt_BR/).

When a user visits your site:

  1. The system checks their browser language
  2. If that language is active, it's shown
  3. If not, the system falls back to your default language (usually en_US)

Managing Languages

Activating a Language

To enable a language so it appears in the language selector:

  1. Navigate to the language's directory: lang/<locale>/
  2. Open the config.php file
  3. Set 'active' => true
return [
    'active' => true,
    'dir' => 'ltr', // 'ltr' for Left-to-Right, 'rtl' for Right-to-Left
];

Deactivating a Language

To hide a language:

  1. Open lang/<locale>/config.php
  2. Set 'active' => false

Alternatively, you can delete the language folder entirely if you're sure you won't need it.

Note: If only one language is active, the language selector automatically hides itself.


Adding a New Language

Want to add a language that isn't included?

  1. Copy the Base: Duplicate the lang/en_US/ folder
  2. Rename: Rename the new folder to your target locale (e.g., nl_NL for Dutch)
    • Format: language_COUNTRY (ISO 639-1 language code + ISO 3166-1 country code)
  3. Translate: Open the files inside the new folder and translate the values
  4. Activate: Set 'active' => true in your new config.php

Language File Structure

Each language folder contains:

lang/en_US/
├── config.php          # Active status and text direction
├── common.php          # Main translation strings
├── auth.php            # Authentication messages
├── pagination.php      # Pagination text
├── passwords.php       # Password reset messages
├── validation.php      # Form validation messages
├── otp.php             # OTP/verification messages
├── referral.php        # Referral feature text
└── md/                 # Markdown content pages
    ├── privacy.md      # Privacy policy
    ├── terms.md        # Terms of service
    └── faq.md          # FAQ page

Editing Content Pages

Some content, like the Privacy Policy, Terms, and FAQ, is stored as Markdown files.

To edit these pages:

  1. Go to lang/<locale>/md/
  2. Open the relevant .md file (e.g., privacy.md)
  3. Edit the text using Markdown syntax

Setting the Default Language

If your application should default to a language other than English, add these variables to your .env file:

APP_LOCALE=pt_BR
APP_FALLBACK_LOCALE=pt_BR
Variable Purpose
APP_LOCALE The primary language shown to visitors
APP_FALLBACK_LOCALE Used when a translation key is missing in the current language

Protecting Custom Translations During Updates

⚠️ Important: When you add or modify translations, you must protect them from being overwritten during automatic updates.

Add your custom translation directories to your .env file:

# Protect custom German and French translations
PROTECTED_TRANSLATIONS="de_DE,fr_FR"

Multiple directories are separated by commas. These paths are relative to the lang/ folder.

Why This Matters

When you update Reward Loyalty:

  • The updater replaces core language files with new versions
  • Any customizations you made would be lost
  • Protected paths are automatically backed up and restored

What to Protect

Protect any language folder where you have:

  • Translated content for a new language
  • Modified existing translations
  • Added custom Markdown content (privacy policy, terms, etc.)

Protecting Other Custom Files

For custom files or directories outside of translations:

# Protect additional custom paths
PROTECTED_PATHS="custom/branding/,my-config.php"

Learn more: See Updating for complete documentation on how updates work and file preservation.


Related Topics

  • Updating — How updates work and protecting custom files
  • Branding — Customize your platform appearance
  • System Settings — All admin configuration options