Skip to main 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.

Dec 5, 2025

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.

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.

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., fr_FR for French).
    • 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: Ensure 'active' => true in your new config.php.

Editing Content

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:

  1. Open config/app.php
  2. Update the locale and fallback_locale values:
'locale' => 'pt_BR',
'fallback_locale' => 'pt_BR',

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