Translates a specified string. Symbolic reference to intllib.Getter
.
Note: this page has been written for Advtrains 2.0.1 TSS and Minetest 5.1.0. Examples and practices described in this page don't take advantage of improvements introduced in later releases.
attrans(msgid, ...)
msgid
(string): a string to translate.…
(varargs): arguments to replace in the message ID.The translated string.
advtrains/init.lua, lines 6 to 10:
if minetest.get_modpath("intllib") then attrans = intllib.Getter() else attrans = function(s,a,...)a={a,...}return s:gsub("@(%d+)",function(n)return a[tonumber(n)]end)end end