====== attrans ======
//Translates a specified string. Symbolic reference to ''[[https://github.com/minetest-mods/intllib/blob/master/doc/developer.md|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.//
===== Syntax =====
attrans(msgid, ...)
===== Parameters =====
* ''msgid'' //(string)//: a string to translate.
* ''...'' //(varargs)//: arguments to replace in the message ID.
===== Returns =====
The translated string.
===== In source code =====
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