Translation in 3.6.3

Good morning:
I have installed the latest version of privacyidea (3.6.3) but I can’t find enough information to put the server in Spanish.
The downloaded the file:
privacyidea/translations/es/LC_MESSAGES/messages.po
from here:
privacyIDEA/privacyIDEA-UI — Spanish @ Hosted Weblate

but I don’t know what to do with it. In version 2.22 I seem to remember that I had to generate another file called translations.js running the command
grunt nggettext_compile

But now I don’t know what to do
any ideas?
Thanks

I have copied the downloaded file in this path:
privacyidea/translations/es/LC_MESSAGES/messages.po
but I still don’t see the translations.
Should we do something else or is that enough?

I do not know if it is a problem of permissions or location of files and directories, but for more turns that I give I can not change the language.
I have copied all the download files in this path:
/opt/privacyidea/lib/python2.7/site-packages/privacyidea/privacyidea/translations
image

Any ideas please?

The language is determined by the expected browser language.

I don’t know if you mean the browser_lang variable that appears in the file
/opt/privacyidea/lib/python2.7/site-packages/privacyidea/webui/login.py

in my case it is like this:

browser_lang = request.accept_languages.best_match ([“es”, “de”, “de-DE”, “nl”, “fr”, “it”, “en”], default = “es”). split (" - ") [0]

I have also tried with several browsers, in all the language settings are Spanish “ES” and in all of them the pages are shown in English.

Hello @JoseMa

thank you for your patience.

maybe interesting for you @plettich, too.

Actually with adding a new language we need to add it in our top level Makefile in the translate directive, which should look like:

POS = $(wildcard po/*.po)
translate:
	grunt nggettext_extract
	for language in $(POS); do \
		(msgmerge $$language po/template.pot > tmp.po; mv tmp.po $$language) ; \
	done
	grunt nggettext_compile --force

This directive builds the file ./privacyidea/static/components/translation/translations.js which contains the UI translations.