faker-js / faker

Generate massive amounts of fake data in the browser and node.js
https://fakerjs.dev
Other
12.62k stars 909 forks source link

Add language #1548

Open nicolasWD opened 1 year ago

nicolasWD commented 1 year ago

Clear and concise description of the problem

I am looking to add random languages for a field "Spoken Languages"

Suggested solution

Under faker.name please add language, like spoken language (e.g. English, Chinese, Spanish)

or

in faker.random.locale() you could add the option to return language name instead of the 2 letter code only

Alternative

No response

Additional context

No response

ST-DDT commented 1 year ago

Sounds like an interesting proposal.

Do you need a list/one of all languages in the world or one of the languages in your country/state? Are you willing to create a PR for that?

nicolasWD commented 1 year ago

For the specific project I am working on, I need multiple unique world language names (e.g. English, French).

Yes, I can open a PR for this. Under which branch should I create the PR?

nicolasWD commented 1 year ago

Ok, please let me know of the next steps.

ST-DDT commented 1 year ago

This list might be a bit excessive:

See also here: https://github.com/faker-js/faker/blob/next/CONTRIBUTING.md

Please let us know, if you have any questions or anything is unclear.

nicolasWD commented 1 year ago

Yes, I found Contributing a very nice and concise read. Will start immediately! Thank you!

matthewmayer commented 1 year ago

Would you expect it to return "German" or "Deutsch" in the en locale? Might need to split into two methods for that, or add a parameter to determine if you expect the locale name of the language.

https://en.wikipedia.org/wiki/Linguonym

ST-DDT commented 1 year ago

No, it will always return the name of the languages in the currently selected locale. So in en it is German and in de it is Deutsch...

If you want it in another locale, switch to that.

xDivisionByZerox commented 1 year ago

@nicolasWD Are you still working on that? Otherwise, I would label this with help wanted and unassign you so other people can take it.

nicolasWD commented 1 year ago

I did start it and was struck with some personal issues/drama. I would still be happy to continue this as it would be my first contribution here. I will let you know soon, if anything changes.

xDivisionByZerox commented 1 year ago

This is NOT scheduled for any specific release, so you are fine. Just wanted to know, so I can keep the tickets clean^^

nicolasWD commented 1 year ago

@xDivisionByZerox thank you, I appreciate it

github-actions[bot] commented 8 months ago

Thank you for your feature proposal.

We marked it as "waiting for user interest" for now to gather some feedback from our community:

chrda81 commented 6 months ago

+1

ST-DDT commented 6 months ago

@chrda81 Please upvote the issue instead of posting +1.