Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add en-AU translation file #10514

Closed
wants to merge 1 commit into from
Closed

Conversation

leevigraham
Copy link
Contributor

@leevigraham leevigraham commented Feb 10, 2022

Description

Added an en-AU translation file. This en-AU translation file imports the en-GB translation file.

The purpose of this PR is to add English (Australia) to both Language and Formatting user preferences.

This is important becuase the src/i18n/Locale.php class uses the users locale when formatting numbers and currency (new Money Field).

image

Ideally the Formatting Locale drop down options would be independent of the language and include a more exhaustive list of locales.

Example OSX settings:

Screen Shot 2022-02-10 at 10 12 37 pm

The same approach can be taken for en-CA.

@leevigraham
Copy link
Contributor Author

ping @engram-design @lukeholder 🇦🇺🦘🥧

@engram-design
Copy link
Contributor

FYI, we add 'defaultCpLanguage' => 'en_au' to our general.php config file, which allows this to show up in the user profile. But this probably couldn't hurt!

@leevigraham
Copy link
Contributor Author

@engram-design In that case wouldn't the CP language still default to en-US given there's no language file for en-AU.

@leevigraham
Copy link
Contributor Author

@engram-design A slightly better solution is to:

  1. add 'extraAppLocales' => ['en-AU'], to config.general.php
  2. add a new translation file in /translations/en-AU/app.php
<?php
# /translations/en-AU/app.php
return require CRAFT_VENDOR_PATH . '/craftcms/cms/src/translations/en-GB/app.php';

@brandonkelly
Copy link
Member

Closing this in favor of #10519.

@engram-design
Copy link
Contributor

@leevigraham Well, no idea how it works then! 🤷‍♂️

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.

3 participants