-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Incorrect locale be_BE #591
Comments
True, although @ronanguilloux's formatter is for the belgian country regardless of the language. But you're right, I belive the formatter should be included in a real locale. Ronan, any insight? |
Well yes @eMerzh is very right, this is not a real genuine locale: this 'be-BE' locale was introduced only to handle the implementation of a Belgian fake VAT provider here, regardless of the language. And yes, this may become embarrassing for the next Belgian-related providers implementations, so I'm very agree to wipe out this fake (!) 'be_BE' locale. Related to the immediate VAT question that provoked the problem here, we may have a quick workaround creating a global, new VAT-specific provider, expecting a national prefix as parameter. See IsoCodes VAT. Actually, and for the sake of programmers, VAT rules are regexp-based. This may allow us to delete this be_BE folder. => Is that proposition OK to both of you to fix this issue? But in a broader way it seems that Faker didn't had to seized the problem of national-related providers that are not related to a specific language in particular national contexts, so it's a bit more about lib architecture here (i.e. : avoiding duplicated code, introducing an inheritance logic between nation-related providers, etc.). I admit my workaround proposition is just putting off dealing with this question until a later date :-| |
Yeah i thing the best way to address this is to manage country related problems with a country param and not a locale one ... |
I like your solution, too. As for avoiding duplication, the best is to create a calculator class (like https://github.com/fzaninotto/Faker/blob/master/src/Faker/Calculator/Luhn.php), and use it in all formatters depending on this code. |
Fixed by #896 |
correct me if i'm wrong but there is no such thing as be_BE
there is fr_BE or nl_BE (french belgian, neederlands belgian)
or be_BY (Belarusian Belarus)
The text was updated successfully, but these errors were encountered: