Hi all,
We need change the default language for our Dataverse.
When user call the url the Dataverse comes in English by default, but we would like that the language was our native.
We try use:
curl http://localhost/api/admin/settings/:Languages -X PUT -d '[{"locale":"br","title":"Português"}, {"locale":"en","title":"English"}]'
but this curl comand only add and change order in navbar.
Any ideas?
Richard W Valdivia
Superintendência de Tecnologia da Informação (STI)
Analista de Tecnologia da Informação
Telefone (11) 5576-4848 ramal 8529
Universidade Federal de São Paulo (UNIFESP)
--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-commu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/594f0990-45f7-fd46-5c7a-fccd625ac190%40gmail.com.
I think Dataverse just picks up the default locale/language of the machine it is running on (via the LANG environment variable). How you set the default locale/language for your operating system should be documented on the web.
-- Jim
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/CABbxx8F55jNKWSc_MhgzS01AUgrrez%2Bi955_YpAt2HhgFdgOPA%40mail.gmail.com.
Tks James and Phil,
Still trying to solve this problem, I was careful to check the machine's locale, how both you mention:
This (bellow) is the result:
[dataverse_install]#> locale
LANG=pt_BR.UTF-8
LC_CTYPE="pt_BR.UTF-8"
LC_NUMERIC="pt_BR.UTF-8"
LC_TIME="pt_BR.UTF-8"
LC_COLLATE="pt_BR.UTF-8"
LC_MONETARY="pt_BR.UTF-8"
LC_MESSAGES="pt_BR.UTF-8"
LC_PAPER="pt_BR.UTF-8"
LC_NAME="pt_BR.UTF-8"
LC_ADDRESS="pt_BR.UTF-8"
LC_TELEPHONE="pt_BR.UTF-8"
LC_MEASUREMENT="pt_BR.UTF-8"
LC_IDENTIFICATION="pt_BR.UTF-8"
LC_ALL=
But for the localized language to be Portuguese (from Brazil) the curl command uses "br" and not "pt" in json value (most likely not to conflict with Portuguese from Portugal)
curl http://localhost/api/admin/settings/:Languages -X PUT -d '[{"locale":"br","title":"Português"}, {"locale":"en","title":"English"}]'
Wouldn't that be the problem there? I could be wrong but I don't
remember i18n using "br" and so the getCurrentLocale method hasn't
found the language correctly. The i18n for Brazil is pt_BR and
Portugal is pt_PT. Well, this only an ideia.
This week I'm very busy, but I'm going to try to check the git source code and get the getCurrentLocale method as a reference, as Phil said.
Sorry my bad english!
If have any other ideas...
tks
Richard
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/MN2PR07MB73435F0805AF3F10C8D1292CBF019%40MN2PR07MB7343.namprd07.prod.outlook.com.
Richard,
A couple thoughts:
· Have you tried {"locale":"pt","title":"Português"} in the :Languages setting? If your machine then has pt_BR for the language for that locale, that may be enough. (If not, perhaps “pt_BR” might work?)
· Turning on fine logging for the DataverseSession, uti.BundleUtil class and possibly others involved in finding the correct language might help you diagnose what is happening on your machine.
· From what I can see, the final step to figure out which file to look in for the translated test is
ResourceBundle.getBundle("propertyFiles/" +propertyFileName, currentLocale);
where java.util.ResourceBundle is a standard Java class. Since we’re getting the locale from the OS and using standard Java at the end, there’s hope that the answer is not Dataverse specific and you might be able to find info on the web on how to configure things correctly.
Hope something there helps,
-- Jim
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/dca4aa27-47bf-1ed2-03f7-a8c76158b476%40gmail.com.
If I set something like above, the locale value will be fr_CA
Remember the bundle properties for french ends with _fr, so the locale value should be "fr".