Skip to content

Update .env.example to fix smilar locales issue #6643

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

Closed
wants to merge 1 commit into from

Conversation

mrananyan
Copy link

Using short locale codes can become a potential issue in large projects, especially when developers need to support similar languages, such as English (US) and English (UK). While both are English, there are notable differences in spelling, vocabulary, and formatting. Relying on a generic locale like en is misleading and can lead to unexpected behavior.

For example, the php artisan lang:publish command currently generates the lang/en directory based on the APP_LOCALE value from the .env file. However, this approach is flawed. It would be more accurate to generate a directory like lang/en_US to avoid conflicts between similar locales and provide proper localization support.

Using short locale codes can become a potential issue in large projects, especially when developers need to support similar languages, such as English (US) and English (UK). While both are English, there are notable differences in spelling, vocabulary, and formatting. Relying on a generic locale like `en` is misleading and can lead to unexpected behavior.

For example, the `php artisan lang:publish` command currently generates the `lang/en` directory based on the `APP_LOCALE` value from the `.env` file. However, this approach is flawed. It would be more accurate to generate a directory like `lang/en_US` to avoid conflicts between similar locales and provide proper localization support.
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