-
-
Notifications
You must be signed in to change notification settings - Fork 155
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
add locale to word module #903
Comments
Hi @cieslarmichal, I would like to collaborate on this issue. After looking the code (the books and words modules), I noticed that right now this generate only English words . I am thinking in generate the Spanish(ARG) arrays in the word_store.h, new functions and tests. If it's ok(only for Spanish and English locations), please assign it to me. |
Yeah you can do only with those two locales and it locale doesnt exist return default english |
Hi @cieslarmichal, I've done something (added to word module es_AR)... how could I get a code review? Just generate a pull request? If everything is ok, I will continue with another languages. I am considering using std::vector instead of std::array in the structures in "word_store.h". |
@gustavobastian yup just generate a PR, why would you like to change it to vector? |
I am generating a map with the key each faker::Locale, and the value, the array. If we use const vector, instead of const array, we can let the compiler to calculate the size of each language structure. Right now, we are forced to store the same number of words for each language, and I don´t know if other languages has enough words for each kind, as the map is (key,array<string_view>xxx): We can repeat some words in order to get the desired number... There are multiple solutions for the situation. |
We can use std::span as an abstraction for array so we dont need to know its size, check person module or location or books there are some exaples of using span with an array |
ref book module
The text was updated successfully, but these errors were encountered: