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

Improve localization schema #178

Open
selfbg opened this issue Dec 5, 2019 · 3 comments
Open

Improve localization schema #178

selfbg opened this issue Dec 5, 2019 · 3 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@selfbg
Copy link
Contributor

selfbg commented Dec 5, 2019

Maybe instead of column per language (track.name_en, track.name_bg, etc) use another table with languages (id, name, code, ... ) and another one table for translations?

For example:

  • Create one table Languages (lang_id, ....)
  • In track table, remove name_bg and rename name_en to name.
  • Create new table track_tr, with fk track_id, lang_id, translation

I think it will be better maintainable. @angelk Any thoughts?

@selfbg selfbg added enhancement New feature or request question Further information is requested labels Dec 5, 2019
@angelk
Copy link
Member

angelk commented Dec 8, 2019

How easy is to handle this using the current ORM - doctrine and symfony forms?

@selfbg
Copy link
Contributor Author

selfbg commented Dec 11, 2019

@angelk You could see some initial ideas in the languages_schema branch.

I'm not sure how the forms will be handled.

  • Maybe, there should be only one text field for name. On form submission, the controller check the current locale, and sets this field. However this way there won't be any fallback language.
  • Force English name/description with optional translations.

@angelk
Copy link
Member

angelk commented Dec 12, 2019

The user should be able to fill multiple languages on single page.

May be this change will have more problems than improvements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants