Mayank0255 / Stackoverflow-Clone-Frontend

Clone project of a famous Q/A website for developers built using MySQL, Express, React, Node, Sequelize :globe_with_meridians:
https://stackoverflow-clone-client.vercel.app
MIT License
543 stars 207 forks source link

[Frontend]: Add Text Localization To All The Pages #86

Open Mayank0255 opened 2 years ago

Mayank0255 commented 2 years ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

growupanand commented 9 months ago

@Mayank0255

Do you have any plan how it should be done?

Mayank0255 commented 9 months ago

@Mayank0255

Do you have any plan how it should be done?

While inserting to db, the language should be english, so that in our db we have data in one language. Then, while fetching the data, it should be localized based on the users location (if possible, otherwise by default english is fine). Then give them a dropdown inside the profile section to change the language.

Two ways,

  1. We will keep the language preference in our db, then while returning the response of the APIs, we will convert. This will though induce some added time to the response time.
  2. We keep the language preference, then on frontend we convert the text through some library.
growupanand commented 9 months ago

@Mayank0255 Do you have any plan how it should be done?

While inserting to db, the language should be english, so that in our db we have data in one language. Then, while fetching the data, it should be localized based on the users location (if possible, otherwise by default english is fine). Then give them a dropdown inside the profile section to change the language.

Two ways,

  1. We will keep the language preference in our db, then while returning the response of the APIs, we will convert. This will though induce some added time to the response time.
  2. We keep the language preference, then on frontend we convert the text through some library.

This looks like you want localization to all user data also or can you clear if you want to localize the frontend UI only.