Skip to content

Allow i18n to have only one locale #6263

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
martinjagodic opened this issue Mar 4, 2022 · 1 comment · Fixed by #6406
Closed

Allow i18n to have only one locale #6263

martinjagodic opened this issue Mar 4, 2022 · 1 comment · Fixed by #6406
Labels
area: i18n type: feature code contributing to the implementation of a feature and/or user facing functionality

Comments

@martinjagodic
Copy link
Member

Is your feature request related to a problem? Please describe.
If you configure this either globally or on a collection

i18n:
  locales: [en]

you get this error: 'i18n.locales' must NOT have fewer than 2 items

If you want to temporarily disable a locale or you are testing only one, this is quite annoying. You would have to change the structure of the i18n object every time, which can be time-consuming if you have a lot of those on file collections for instance.

Describe the solution you'd like
Allow i18n.locales to have only one item

Describe alternatives you've considered
Currently, you need to set i18n: false, which is not technically the same.

@martinjagodic martinjagodic added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Mar 4, 2022
@dfdez
Copy link
Contributor

dfdez commented Apr 13, 2022

Following this issue I'be been working in some use cases in which is useful to be able to have only one locale.

As @martinjagodic you could set the config to i18n: false, but technically is not the same. Mainly because the final file / folder structure is going to be completely different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: i18n type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants