I am making a quiz app which reads data from text files. The app works fine but I now want to translate it into English (from my native language). I can do that for strings defined in source files (.py) such as text on buttons etc., but have troubles with extracting text that needs translating from those text documents where all my questions and possible answers are.
I am using module gettext
with Python
and am using operator _
or _(
to indicate translatable strings (which I have set in Poedit under Properties - Sources Keywords).
I have also set paths of my translatable sources to .
(all files in that directory) and even tried setting those .txt
files specifically for extracting.
My text file looks like this (one line of one file):
_(Koliko je 2/0?);_(0):_(ni definirano):_(2);_(ni definirano)
I tried to find which document type's Poedit extracts text from but did not find anything other than "from source" - should it be able to extract from .txt
files or not? If not, how should I name them?
As I said, it does extracts strings from my .py
files so it is working otherwise.