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

Feature request: New localized data: Word(s). #509

Open
olejsc opened this issue Oct 18, 2023 · 0 comments
Open

Feature request: New localized data: Word(s). #509

olejsc opened this issue Oct 18, 2023 · 0 comments

Comments

@olejsc
Copy link

olejsc commented Oct 18, 2023

Please describe why you are requesting a feature

The current randomizer.Words(...)is restrictred to english culture by design.
The other option is the lorem ipsum dataset , but that's not really localized words.

Please provide a code example of what you are trying to achieve

using System;
using Bogus;
					
public class Program
{
	public static void Main()
	{
		Console.WriteLine("Hello World");
		Randomizer.Seed = new Random(8675309);
		
		var faker= new Faker<Something>("nb_NO") // SHOULD return norwegian words
			.RuleFor(s=> s.Name, f=> f.Random.WordsArray(1,20));
		var results = faker.Generate(100);
		foreach (var something in results){
			
			foreach(var word in something.Name){
				Console.WriteLine(word); //Returns english words only, from a series of english datasets
			}

		}
	}
	
	public class Something
	{
		public string[] Name {get; set;}
	}
}

Please answer any or all of the questions below

  • Is the feature something that currently cannot be done?
  • What alternatives have you considered?
    Randomizer.Words() and the lorem dataset.

  • Has the feature been requested in the past?
    Not to my knowledge

If the feature request is approved, would you be willing to submit a PR?
It probably only makes sense to scale out with this feature when dictionairies from the most common languages are used. For me, I'd like to add norwegian words, but the use case is fairly low only for norwegian. Getting dictionairies that are public and free to use (and somewhat updated) is arguably the hardest part.

Yes / No (Help can be provided if you need assistance submitting a PR)
Possibly, if I have time available.

@olejsc olejsc changed the title New localized data: Word(s). Feature request: New localized data: Word(s). Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant