developertools-tech / developertools.tech

A collection of tools for developers served as a PWA
https://www.developertools.tech
MIT License
39 stars 45 forks source link

[Req]: Translate language menu #116

Closed dlford closed 10 months ago

dlford commented 10 months ago

Contact Details

No response

Explain the proposed feature

The language menu currently only lists all languages by their short code. It would be better to list them as the name of the language in that particular language for better comprehension.

Current language list:

ksnip_20231014-125445

Explain the possible use cases for the feature

This would enable folks who don't speak english and/or don't know what the language codes mean to easily find the language they speak

Any other details you would like to provide?

Deliverables:

Optional:

burhanharoon commented 10 months ago

Hey @dlford, can you assign me to work on that feature? I'm excited to get started with the development. Thanks a bunch!

dlford commented 10 months ago

@burhanharoon all yours!

burhanharoon commented 10 months ago

@dlford Just to clarify, do we want languages listed in their locales like this

What do you suggest?

dlford commented 10 months ago

@burhanharoon Great question and thanks for asking, I'm inclined to think each language should be written in its own language (Option two in your examples).

Unless you can see any issues with that?

dlford commented 10 months ago

Also, if you don't mind updating the contributing.md file on how to add a new language with the translation, that'd be great!

burhanharoon commented 10 months ago

Also, if you don't mind updating the contributing.md file on how to add a new language with the translation, that'd be great!

Sure, will do!

burhanharoon commented 10 months ago

I believe it exists in contributing.md under the Basic Example section. It is well-written and according to the project structure. Let me know if you want something else.

dlford commented 10 months ago

I believe it exists in contributing.md under the Basic Example section. It is well-written and according to the project structure. Let me know if you want something else.

@burhanharoon Sorry if I wasn't totally clear on that, would you mind just putting a note about adding the translated language name under Adding a Language?

burhanharoon commented 10 months ago
module.exports = {
  i18n: {
    // ...
    locales: ['en', 'ja', 'pt-BR', 'YOUR_LOCALE_HERE'], // SHOULD I UPDATE THAT?_
  },
  // ...
};

@dlford

dlford commented 10 months ago

@burhanharoon it's ok as is, don't worry about it.