2

There is a django project that uses localization (internationalization or multiple languages). For Django everything is well described in docs and works well. But the project uses a Python package that is installed in the system and is imported in some places as needed.

from aromodule import clChart as ch clAnalyse as an

Package is mine and I can change code. It is several Python modules(files .py) with classes that implement all sorts of mathematical calculations. Strings(words) there are there too and I want the package returns data in the locale that is currently active in Django. Package is not localized at all. Question is how to localize it. What code should I use? Maybe add something to __init__.py? Help please, despite of huge amount of various samples in the net, I did not find something similar to my case.

Maxim Koro
  • 63
  • 6
  • I'm just looking for similar problem, I am using django axes to control login attempts, but I don't know how to translate this models :( – TomRavn May 15 '19 at 15:52
  • Seems like this way with symlinks to thirdparty app working. I had to localize .po file in django axes directory, I had to copy all new generated items from axes .po file into my .po file and this working for me, reference is here: https://stackoverflow.com/a/20331816/7420836 – TomRavn May 15 '19 at 16:23

0 Answers0