When learning gettext in lua, a strange problem arose: it simply does not work. Folder structure:
gtest -> locale -> ru -> LC_MESSAGES -> test.mo test.po test.lua The code that loads it is:
gettext = require 'gettext' --> библиотека https://github.com/bungle/lua-resty-gettext/blob/master/lib/resty/gettext.lua gettext.bindtextdomain ('test', 'locale'); gettext.textdomain ('test'); _ = gettext.gettext However, the translation is not displayed. What's the matter?
UPD: LANG = en_RU.UTF8.
export LANG=ru_RU.UTF-8in the console and then run the program in the same console? - andreymal