Open rfmuniz opened 4 years ago
i set locale to pt_BR:
I am using docker file, and set this variables:
ENV LD_LIBRARY_PATH /usr/glibc-compat/lib RUN /usr/glibc-compat/bin/localedef -i pt_BR -f UTF-8 pt_BR.UTF-8 ENV LANG pt_BR.UTF-8 ENV LANGUAGE pt_BR.UTF-8 ENV LC_ALL pt_BR.UTF-8
my locale -a:
/usr/glibc-compat/bin/locale -a
C POSIX pt_BR.utf8
Ex: My locale monetary /# /usr/glibc-compat/bin/locale -k LC_MONETARY int_curr_symbol="BRL " currency_symbol="R$" mon_decimal_point="," mon_thousands_sep="." mon_grouping=3;3 positive_sign="" negative_sign="-" int_frac_digits=2 frac_digits=2 p_cs_precedes=1 p_sep_by_space=1 n_cs_precedes=1 n_sep_by_space=1 p_sign_posn=1 n_sign_posn=1 crncystr="-R$" int_p_cs_precedes=1 int_p_sep_by_space=1 int_n_cs_precedes=1 int_n_sep_by_space=1 int_p_sign_posn=1 int_n_sign_posn=1 duo_int_curr_symbol="BRL " duo_currency_symbol="R$" duo_int_frac_digits=2 duo_frac_digits=2 duo_p_cs_precedes=1 duo_p_sep_by_space=1 duo_n_cs_precedes=1 duo_n_sep_by_space=1 duo_int_p_cs_precedes=1 duo_int_p_sep_by_space=1 duo_int_n_cs_precedes=1 duo_int_n_sep_by_space=1 duo_p_sign_posn=1 duo_n_sign_posn=1 duo_int_p_sign_posn=1 duo_int_n_sign_posn=1 uno_valid_from=10101 uno_valid_to=99991231 duo_valid_from=10101 duo_valid_to=99991231 conversion_rate=1;1 monetary-decimal-point-wc=44 monetary-thousands-sep-wc=46 monetary-codeset="UTF-8" / #
/usr/glibc-compat/bin/locale -k LC_MONETARY
But in python, my locale don't get this config:
>>> import locale >>> >>> locale.localeconv()['frac_digits'] 127 >>> locale.localeconv()['currency_symbol'] ''
How I set the frac_digits to 2, in python ? or currency_symbol to R$ ?
i set locale to pt_BR:
I am using docker file, and set this variables:
my locale -a:
/usr/glibc-compat/bin/locale -a
C POSIX pt_BR.utf8
Ex: My locale monetary /#
/usr/glibc-compat/bin/locale -k LC_MONETARY
int_curr_symbol="BRL " currency_symbol="R$" mon_decimal_point="," mon_thousands_sep="." mon_grouping=3;3 positive_sign="" negative_sign="-" int_frac_digits=2 frac_digits=2 p_cs_precedes=1 p_sep_by_space=1 n_cs_precedes=1 n_sep_by_space=1 p_sign_posn=1 n_sign_posn=1 crncystr="-R$" int_p_cs_precedes=1 int_p_sep_by_space=1 int_n_cs_precedes=1 int_n_sep_by_space=1 int_p_sign_posn=1 int_n_sign_posn=1 duo_int_curr_symbol="BRL " duo_currency_symbol="R$" duo_int_frac_digits=2 duo_frac_digits=2 duo_p_cs_precedes=1 duo_p_sep_by_space=1 duo_n_cs_precedes=1 duo_n_sep_by_space=1 duo_int_p_cs_precedes=1 duo_int_p_sep_by_space=1 duo_int_n_cs_precedes=1 duo_int_n_sep_by_space=1 duo_p_sign_posn=1 duo_n_sign_posn=1 duo_int_p_sign_posn=1 duo_int_n_sign_posn=1 uno_valid_from=10101 uno_valid_to=99991231 duo_valid_from=10101 duo_valid_to=99991231 conversion_rate=1;1 monetary-decimal-point-wc=44 monetary-thousands-sep-wc=46 monetary-codeset="UTF-8" / #But in python, my locale don't get this config:
How I set the frac_digits to 2, in python ? or currency_symbol to R$ ?