Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

[Story] better language selector #10

Open
4 tasks
halsk opened this issue Feb 13, 2022 · 2 comments
Open
4 tasks

[Story] better language selector #10

halsk opened this issue Feb 13, 2022 · 2 comments

Comments

@halsk
Copy link
Member

halsk commented Feb 13, 2022

Goal:

As a user, I want to keep the selected language so that I can read content in my preferred language.

Tasks:

  1. Use the browser's default language when no language is selected.
  2. Keep the selected language when users switch languages.
  3. Need to decide how we can specify the language in the URL. (domain? subdir? language parameters?)
  4. Add a language setting to the user's settings.
  5. User-generated content should be auto-translated? (as a Future work)

Acceptance Criteria:

  • At a first visit, users can see contents with the browser's default language.
  • After switching languages, the contents should be displayed in the selected language.
  • If users specify a language with parameters (or URL/subdomain?), the contents should be displayed in the selected language.
  • if users set the language in their settings page, the language is used.
@MaySoMusician
Copy link
Collaborator

  1. Need to decide how we can specify the language in the URL. (domain? subdir? language parameters?)

The best choice will be to use query parameters. Here's why.

A URL describe where a document is located; if a URL differs from another one, these documents that the URLs refer to are different.

Assume we have a project "foobar" and have two lanuguage English and Japanese. If we separate the project pages for each language by domain level, we'll get something like en.hackdays.example/foobar and ja.hackdays.example/foobar. Or, using subdirectories, we'll get 'hackdays.example/en/foobar' and hackdays.example/ja/foobar. These two approaches will distinguish the English page and the Japanese page.

In our app, however, every language version of one project has almost same content. We shouldn't split them into multiple pages by assigning to different URLs with domains or subdirectories. Instead, just based on the single page, we can tell the server which language the users want through query parameters,

@halsk
Copy link
Member Author

halsk commented Apr 7, 2022

OK, let's use a query parameter to specify the language. In the future, we can create a language field in the user setting.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants