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
.arbfile 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:
- Edit any
.arbfile to adjust strings - Maintain the key naming convention
- Rebuild the localization files with:
flutter gen-l10nThis 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
.envvariables:
DEFAULT_LANGUAGE=en
DEFAULT_LOCALE=en_USThis 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 β
- 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)
- 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
- You can create multiple regions, each with its own currency and zone-specific pricing.
π± Currency Propagation β
| Component | Behavior |
|---|---|
| Customer App | Displays prices in the regionβs assigned currency |
| Driver App | Shows earnings, incentives, and trip values accordingly |
| Admin Panel | Reports, trip logs, and payment gateways adjust based on currency |
| Payment Gateways | Must support the assigned currency (configured per provider) |
| SMS & Receipts | Show 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:
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.0060These 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 β
| Feature | Configurable From | Format / Tool |
|---|---|---|
| Default Language | .env file | DEFAULT_LANGUAGE |
| Translations | libs/flutter_localizations | .arb + flutter gen-l10n |
| Default Currency | Admin Panel β Region | Set per region |
| Metric System | .env file | `METRIC_SYSTEM=metric |
| Default Location | .env file | DEFAULT_LOCATION_LAT/LNG |
