mirror of
https://github.com/minetest-mods/intllib.git
synced 2025-02-11 01:00:21 +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)
|
local modpath = minetest.get_modpath(modname)
|
||||||
msgstr = { }
|
msgstr = { }
|
||||||
for _, l in ipairs(get_locales(langcode)) do
|
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
|
for k, v in pairs(t) do
|
||||||
msgstr[k] = msgstr[k] or v
|
msgstr[k] = msgstr[k] or v
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user