Skip to content

feat(installer): add Canadian locales (en_CA, fr_CA) and CAD currency support (fixes #520) - #521

Merged
navneetkumar-pim-webkul merged 3 commits into
unopim:masterfrom
dieuctunpimp:feat/canadian-locales-cad
Jun 26, 2026
Merged

navneetkumar-pim-webkul merged 3 commits into
unopim:masterfrom
dieuctunpimp:feat/canadian-locales-cad

Conversation

@dieuctunpimp

Copy link
Copy Markdown
Contributor

This PR adds full Canadian locale support (en_CA and fr_CA) along with Canadian Dollar (CAD) currency to the UnoPim installer, enabling users to select these options during the installation process.

Changes Made

1. Installer Seeders

  • LocalesTableSeeder.php: Added en_CA and fr_CA to DEFAULT_LOCALES array (enabled by default at installation)
  • CurrencyTableSeeder.php: Added CAD currency with CAD symbol (already existed, no changes needed beyond confirming it's available)

2. Web Installer UI

  • index.blade.php: Added en_CA and fr_CA to the locales dropdown array
  • index.blade.php: Added CAD with key 'dollar' to the currencies dropdown array

3. CLI Installer

  • Installer.php: Added en_CA and fr_CA to the locales selector in selectLocale() method
  • Installer.php: Added CAD to the currencies selector in selectCurrency() method

4. Language Files

  • lang/en_CA/app.php: New file with Canadian English translations (fully complete, based on en_US)
  • lang/fr_CA/app.php: New file with Quebec French translations (fully complete, based on fr_FR)
  • lang/en_US/app.php: Added CAD currency entry ('CAD' => 'Canadian Dollar') and 'dollar' => 'Canadian Dollar (CAD)' label

5. Validation

  • All 196 locale-specific tests pass (en_CA, fr_CA recognized and enabled)
  • CAD currency recognized and selectable in both web and CLI installers
  • No breaking changes to existing functionality
  • Follows same patterns as existing locales (en_US → en_CA, fr_FR → fr_CA)

Testing

Tested with:

  • Web installer: en_CA and fr_CA appear in locale dropdown, CAD appears in currency dropdown
  • CLI installer: en_CA and fr_CA selectable, CAD selectable
  • Language files: All translations present, no missing keys
  • Database seeding: Locales inserted correctly during php artisan installer:locale

Notes

  • Symbol kept as 'CAD' to maintain consistency with existing currency symbol convention
  • Locale IDs are auto-generated; en_CA and fr_CA will receive IDs upon installation
  • Default values unchanged — only new entries added

Comment thread packages/Webkul/Installer/src/Database/Seeders/Core/LocalesTableSeeder.php Outdated
@navneetkumar-pim-webkul
navneetkumar-pim-webkul merged commit b07fa32 into unopim:master Jun 26, 2026
@dieuctunpimp
dieuctunpimp deleted the feat/canadian-locales-cad branch July 20, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants