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

Implement multi language switch #21

Open
Aichnerc opened this issue Aug 25, 2021 · 0 comments
Open

Implement multi language switch #21

Aichnerc opened this issue Aug 25, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@Aichnerc
Copy link
Member

Is your feature request related to a problem? Please describe.
Currently it is no possible to edit a page on multiple languages.

Describe the solution you'd like

It should be possible for each page to have a dropdown menu for multiple languages.
This was the page structure stays the same and the values change.

The following is an idea, not an instruction.

User stories

  • As a user I want to be able to switch between languages without creating a new page for a language.
  • As a user I want to be able to switch between languages instantly.
  • As a user I want to be able to see what language I have currently selected.
  • As a user I want to be able to select a language individually for each page.
  • As a user I want to be able to select the primary language of the page.
  • As a user I want to globally define what languages I want to add, which automatically adds the sub languages to all pages.
  • As a user I want to be able to add a menu item to a menu (header, footer) to be able to switch between all possible languages.
  • (Optional) As a user I want to be able to enable automatic translation. When enabled, when changing the main language value of a field, it automatically updates the sub languages when saved or published.

Work flow

  • To create a new language, select the language from the dropdown. (First only EN us_en)
  • (Optional) The values from the main language are automatically translated and mapped to the fields.
  • The user can now see the main language value as a help text under each field (make sure to make it "hideable"), making it easier to translate the field values.
  • The user can now enter the new languages which are being mapped to the language in question.
  • If all fields are filled in (no empty fields), the language is marked as "complete translation", which can be shown in the dropdown menu (See screenshot).

I would consider the following structure of data

{
  de: "Das ist ein Text.",
  en: "This is a text."
}

for all field values, which the one language selected being loaded into the value property of the field.

Optional use of Google Cloud API

Optionally, it should be possible to use Google Translate when creating a new language to automatically translate the existing values of the main language to the language selected. The user should have to provide his/her own Google Translate API key.

APIs required:

  • Cloud Translation API

Please make sure to restrict the API when testing, once it is cheap but not free.

Additional context

image

@Aichnerc Aichnerc added enhancement New feature or request Feature and removed enhancement New feature or request labels Aug 25, 2021
@kleberbaum kleberbaum added enhancement New feature or request and removed Feature labels Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants