Skip to content

Currency & Language Configuration ​

Ridy supports full multi-language and multi-currency capabilities. These settings determine how content and pricing are displayed across all interfaces β€” admin panel, driver app, customer app, and web panels.


🌐 Language & Localization ​

Ridy includes 32 languages out of the box. These are implemented using Flutter’s standard .arb format and the flutter_localizations package. Most are machine-translated and can be refined manually.

πŸ—οΈ How Localization Works ​

  • Language files live in:
    libs/flutter_localizations/lib/l10n/
  • Each .arb file corresponds to a locale (e.g. en.arb, fr.arb, es.arb)
  • Translations are auto-loaded in the app based on the device or user-selected language

πŸ§ͺ To Customize a Translation:

  1. Edit any .arb file to adjust strings
  2. Maintain the key naming convention
  3. Rebuild the localization files with:
bash
flutter gen-l10n

This updates the Dart files used by the app’s localization runtime.

🌍 Language Switching

  • Supported in all apps with built-in language selectors
  • Default language can be enforced using .env variables:
env
DEFAULT_LANGUAGE=en
DEFAULT_LOCALE=en_US

This is used as a fallback when user preference or system locale isn't detected.


πŸ’΅ Currency System ​

Ridy uses a region-based currency model. This is managed through the Admin Panel and controlled by your operational zones.

🧭 How It Works ​

  1. Create a Region in the Admin Panel
    • Go to Settings β†’ Regions
    • Define country, city, and operational area
    • Assign a currency (e.g., USD, EUR, INR)
  2. Once assigned:
    • That currency becomes the default for that region
    • All fares, fees, payments, and receipts within that region will use the assigned currency
    • The same applies across mobile apps, web apps, and backend systems
  3. You can create multiple regions, each with its own currency and zone-specific pricing.

πŸ’± Currency Propagation ​

ComponentBehavior
Customer AppDisplays prices in the region’s assigned currency
Driver AppShows earnings, incentives, and trip values accordingly
Admin PanelReports, trip logs, and payment gateways adjust based on currency
Payment GatewaysMust support the assigned currency (configured per provider)
SMS & ReceiptsShow fare breakdowns in localized format

Currency formatting (e.g., symbol placement, decimal precision) is handled automatically based on locale.


🌐 Locale & Measurement Settings ​

Additional default settings can be defined via .env:

env
DEFAULT_COUNTRY=US
DEFAULT_CURRENCY=USD
DEFAULT_LANGUAGE=en
DEFAULT_LOCALE=en_US
METRIC_SYSTEM=metric       # or 'imperial'
DEFAULT_LOCATION_LAT=40.7128
DEFAULT_LOCATION_LNG=-74.0060

These affect:

  • Distance units (e.g., miles vs. kilometers)
  • Currency formatting
  • Default coordinates when GPS is unavailable

πŸ“Œ These values are used primarily during initial app launch and admin panel bootstrapping.


πŸ“ Summary ​

FeatureConfigurable FromFormat / Tool
Default Language.env fileDEFAULT_LANGUAGE
Translationslibs/flutter_localizations.arb + flutter gen-l10n
Default CurrencyAdmin Panel β†’ RegionSet per region
Metric System.env file`METRIC_SYSTEM=metric
Default Location.env fileDEFAULT_LOCATION_LAT/LNG