Quote:
Originally Posted by callimuc
does your server have reading rights to that folder (in the rights of '(npcserver)')? also the file must end with _DOMAIN.po
example for the german translation:
so create a file in levels/translations/* and call it 'graalgui_de.po' (de = german domain). use this as an example for the german translation:
PHP Code:
msgid "Hello"
msgstr "Hallo"
msgid "This is a test"
msgstr "Dies ist ein Test"
then you can do something like
PHP Code:
temp.newText = _("This is a test");
gui.text = temp.newText;
for people having the german language set, it will translate to 'Dies ist ein Test'. And if someone is having a language set you aren't having a translation for, it will just ignore the translation.
im not too sure if its working for stuff like the players chat, I always use it for Clientside stuff on iEra (npcs chat, the text for guis etc).
|
okay, I added rights to the npc server and myself
PHP Code:
rw levels/translations/*
Nammed the file, test_de.po.
Here is contents of that file:
Quote:
msgid "hello"
msgstr "world"
|
and heres the weapon:
PHP Code:
//#CLIENTSIDE
function onCreated() {
loadtranslation("test_de");
player.chat = _("hello");
}