WhatsMine Documentation
Home
  • What is WhatsMine?
  • Feature Tour
  • Requirements
  • Installation
  • Configuration (.env reference)
  • Going Live Checklist
Admin Guide
User Guide
Integrations
  • Architecture
  • REST API v1
  • Production Deployment
  • Frequently Asked Questions
  • Troubleshooting
  • Changelog
Home
  • What is WhatsMine?
  • Feature Tour
  • Requirements
  • Installation
  • Configuration (.env reference)
  • Going Live Checklist
Admin Guide
User Guide
Integrations
  • Architecture
  • REST API v1
  • Production Deployment
  • Frequently Asked Questions
  • Troubleshooting
  • Changelog
  • Developer Reference

    • Architecture
    • Module System
    • REST API v1
    • Outbound Webhooks
    • Theming
    • Internationalisation (i18n)
    • Artisan Commands

Internationalisation (i18n)

WhatsMine is fully translatable, with database-backed locales, JSON dictionaries and right-to-left support. Most translation work is done from Admin → Languages — this page covers the developer side.

Adding a language

  1. Admin → Languages → Add Locale — set the code (e.g. fr), name, direction (ltr/rtl) and flag.
  2. Run php artisan i18n:scan to discover all translatable keys.
  3. Fill in the translations in the admin translation editor (or use Auto-Translate).

Using translations

In PHP:

__('Your subscription has been cancelled.');
trans('billing.subscription_cancelled');

In React:

import { useTranslation } from 'react-i18next';
const { t } = useTranslation();
return <p>{t('billing.subscription_cancelled')}</p>;

How dictionaries are served

The frontend loads translations at runtime from a localized endpoint — so adding or editing translations does not require an asset rebuild. The flattened dictionary is cached for performance.

Editing locale JSON files directly

If you edit resources/js/locales/*.json by hand, the cached dictionary won't update until you invalidate it. The admin translation UI does this automatically; for manual edits, clear the i18n cache (e.g. re-run php artisan i18n:scan or clear the application cache). Translations editing via the admin panel is the recommended path.

RTL support

Set a locale's direction to rtl and the SetLocale middleware adds dir="rtl" to the page. Tailwind's logical properties (ms-, me-, ps-, pe-) mirror the layout automatically.

Multi-currency

Currencies are managed in Admin → Currencies — each with a symbol, decimals and exchange rate relative to the base currency.

Commands

CommandPurpose
php artisan i18n:scanScan PHP/JS for translation keys and create missing entries.
php artisan i18n:seed-defaultsSeed the default locale and base strings.

➡️ Next: Artisan Commands.

Last Updated: 6/19/26, 4:34 PM
Prev
Theming
Next
Artisan Commands