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

Feature request: several default languages #380

Open
Thibibi opened this issue Aug 8, 2022 · 3 comments
Open

Feature request: several default languages #380

Thibibi opened this issue Aug 8, 2022 · 3 comments

Comments

@Thibibi
Copy link

Thibibi commented Aug 8, 2022

Hello, I have a website that is maintained by people from several languages, among which en and fr are prevalent over the others. Both fr and en create the entities in their own language, they roughly create 50% each. People with other languages create nothing, they just translate in their own language what is created by fr and en.

I would not like to force fr people to give an en translation, as well as I would not like to force en people to give an fr translation. Then I refuse to give any required_locales.

What I would like is that, when either an en or fr creates an entity, with his own language, all the other communities see the en or fr text given, whichever it is:

  • An entity created with fr translation (only) is displayed for all in fr...
  • An entity created with en translation (only) is displayed for all in en...
  • ... until anyone sees that, and enters the translation for its own language: then, after that italians see it instead of the fr or en that was entered at creation.

This looks like having several default_locale instead of one. No problem if giving many would likely result in having an order, such as:

"if my language is not present, then look for translation en, then if not present, look for translation fr, else empty string."

or:

"if my language is not present, then look for default_locale 1, then if not present, look for default_locale 2, (etc. for any other default_locale[]) else empty string."

I hope that's clear enough, please tell me your feeling about this.

Best,

@diesonne
Copy link

diesonne commented Oct 7, 2024

Have you ever found a solution to this, we have the same problem for the same use case

@Thibibi
Copy link
Author

Thibibi commented Oct 7, 2024

Hello, yes I solved it but it was quite radical. I abandonned a2lix/TranslationFormBundle and chose to use DoctrineExtensions/translatable.

@diesonne
Copy link

diesonne commented Oct 9, 2024

If it helps anyone, I ended up passing the current language to the form and setting the default_locale and required_locale to the current one the user is in for every form ... a bit tedious but it works

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

No branches or pull requests

2 participants