mirror of
https://github.com/minetest-mods/intllib.git
synced 2025-02-10 00:30:23 +01:00
Add modname.lang.tr
locales support (#32)
This commit is contained in:
parent
016f8af977
commit
6ebdc5388d
3
init.lua
3
init.lua
@ -201,7 +201,8 @@ function intllib.get_strings(modname, langcode)
|
||||
local modpath = minetest.get_modpath(modname)
|
||||
msgstr = { }
|
||||
for _, l in ipairs(get_locales(langcode)) do
|
||||
local t = intllib.load_strings(modpath.."/locale/"..l..".txt") or { }
|
||||
local t = intllib.load_strings(modpath.."/locale/"..modname.."."..l..".tr")
|
||||
or intllib.load_strings(modpath.."/locale/"..l..".txt") or { }
|
||||
for k, v in pairs(t) do
|
||||
msgstr[k] = msgstr[k] or v
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user