@@ -109,6 +109,7 @@ def __init__(self):
109109 "Italy" : "Italia" ,
110110 "Spain" : "España" ,
111111 "Poland" : "Polska" ,
112+ "Belgium" : "België"
112113 }
113114
114115 self .fake = None
@@ -218,14 +219,13 @@ def create_localized_faker(self, country_code: str):
218219 """
219220
220221 # Check if locale exists, otherwise return None
221- locale = next (filter (lambda x : country_code in x , AVAILABLE_LOCALES ), None )
222+ locales = list (filter (lambda x : country_code in x , AVAILABLE_LOCALES ))
222223
223- if not locale :
224- logging .error (
225- f"Invalid country code `{ country_code } `. No faker instance created."
226- )
224+ if not locales :
225+ logging .error (f"Invalid country code `{ country_code } `. No faker instance created." )
227226 return None # No fallback
228227
228+ locale = next (filter (lambda x : 'en' in x , locales ), locales [- 1 ])
229229 try :
230230 # seed to get consistent data
231231 if self .fake is None :
@@ -564,6 +564,7 @@ def normalize_regional_phone_numbers(self, phone: str, region: str) -> str:
564564 "IT" : "39" ,
565565 "PL" : "48" ,
566566 "ES" : "34" ,
567+ "BE" : "32"
567568 }
568569
569570 # Sub out anything that matches this regex statement with an empty string to get rid of extensions in generated phone numbers
@@ -583,8 +584,8 @@ def normalize_regional_phone_numbers(self, phone: str, region: str) -> str:
583584 # Remove country code from the local number
584585 local_number = digits [len (country_code ) :]
585586
586- # Handle leading zero in local numbers (France & Germany)
587- if region in ["FR " , "DE" , "GB" , "IT" , "ES " ] and local_number .startswith ("0" ):
587+ # Handle leading zero in local numbers
588+ if region not in ["US " , "CA " ] and local_number .startswith ("0" ):
588589 # Remove the leading zero
589590 local_number = local_number [1 :]
590591
0 commit comments