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 auto-territory attribute to i18n! #67

Closed

Conversation

varphone
Copy link
Contributor

Add a new attribute auto_territory to the i18n!

i18n!("locales", fallback = "en", auto_territory = true);

The new attribute auto_territory for set the auto territory flag, if true t macro will auto fallback to the language territory of the locale when missing, like: zh-SG => zh, if zh still missing, then fallback to the fallback locale.

@huacnlee
Copy link
Member

huacnlee commented Jan 15, 2024

I think, this may not need to special config, I want to set this fallback logic by default.

Ref:

@varphone
Copy link
Contributor Author

I think, this may not need to special config, I want to set this fallback logic by default.

Ref:

Yes, it makes more sense as the default behavior.

@varphone varphone closed this Jan 15, 2024
@varphone varphone deleted the feature/new-auto-territory-attr branch January 20, 2024 14:50
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