All the guides online cover the topics of internationalization (i18n) and localisation (L10n) pre-mortem if I can say that ie. they all appear to address the concerns before hand ie from the start of writing the code by marking explicitly translatable strings. I will take Python as a specific case. In Python, per instance, you use the special function _() from the gettext module to mark while you write code all the strings that needs translation. You would use then the gettext i18n built-in Python tools such as pygettext.py, msgfmt.py to produce .pot files (Portable Object Templates) used to fill out .po (Portable Object) files and .mo (Machine Object) binary files which represent the translations used by the application. You can also use babel.

Specific Situation: We have a very large application with thousands of existing source code files written in Python. We did the massive mistake of not considering localisation/internationalization from the start. So no strings at all are marked throughout the code. That has been said, what can we do about this?

Is there any software that can help us localize this application to support human languages such as Spanish, French or Portuguese? Are there any tools that can find automatically, intelligently (since we don't want to translate any non essential string in source code) and programatically all the possible translatable strings for localizing in the source code? Suggestions of automatic tools or libraries in Python pertaining to solving this situation are greatly appreciated from the community. Thank you all in advance for your suggestions!

  • Welcome to Software Recommendations! Please note this site is about recommending software, not assets or resources like howtos, manuals/tutorials, code fragments, etc. If you're looking for software, please see What is required for a question to contain "enough information" and edit your question accordingly.
    – Izzy
    Mar 13, 2020 at 8:11
  • 1
    Thank you so much Izzy. This question is about software recommendation concerning a specific situation: un-marked strings in already existing source code written in Python. Recommendations of tools that can find and extract all the strings automatically for localisation purposes are greatly appreciated. I will amend the question and remove links to other languages.
    – HB87
    Mar 13, 2020 at 8:24
  • Thanks for the heads-up – and yes, I suspected as much (which is why I left it open). May I suggest making the software part clearly standing out (to avoid close-votes)? Things like "**TL;DR:**" or a "### Requirements" header followed by a bullet-point list might help with that. You can also devide it into "required", "nice-to-have" etc. Fingers crossed!
    – Izzy
    Mar 13, 2020 at 12:43
  • 1
    Huh, my, should have thought about that earlier: a simple formatting change and it gets much clearer :) When updating, please include whether those tools need to be gratis (or what your price limit is for paid software). If non-Python solutions to "work on the code" are acceptable, the OS they should preferably work on might also be good to name.
    – Izzy
    Mar 13, 2020 at 12:47


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.