Only solution for translating Django templates that worked for me is:
- in Django templates add {% load i18n %} at the top of every where translations is needed
- use {% trans "STRING" %} somewhere in template
- create in $SPLUNK_HOME/etc/apps/[APP_NAME]/django/[APP_NAME]/locale/[LOCALE]/LC_MESSAGES/django.po file
- Add STRING manually in django.po file
- Open django.po file in Poedit, translate strings and create django.mo file
- Restart Splunk
As far as i read, "splunk extract i18n -app APPNAME" won't read Django templates. There must be way to access django-admin.py for app in splunk and then generate files but i still did not find a way how to do that.
If anybody knows any better way of translating Django templates in Splunk that will be great to know 🙂
... View more