View Bug Report | ||||||||||||||
|
![]() |
Sort Options |
By: ckknight - 06-07-06 08:19 PM |
/print BabbleLib:GetInstance("1.1"):GetLocalized("IMPROVED_REINCARNATION") Improved Reincarnation hrm. Works that way. Also, I've been working on BabbleLib 1.2 which you may want to upgrade to. Here's the new API: local S = BabbleLib:GetInstance("Spell 1.2") print(S"Improved Reincarnation") -- will print out the translation in the local language. ;-) |
By: Xplosionist - 06-08-06 08:51 AM |
Bizarre. Okay, it looks like a problem with me trying to change too many things at once. The original code was: babble = BabbleLib:GetInstance("1.0"); name = babble.GetLocalizedSpell(IMPROVED_REINCARNATION); That was failing. I apparently changed it to: babbleSpell = BabbleLib:GetInstance("Spell 1.1"); name = babbleSpell.GetLocalized("IMPROVED_REINCARNATION"); which also failed. It seems that either: babble = BabbleLib:GetInstance("1.0"); name = babble.GetLocalizedSpell("IMPROVED_REINCARNATION"); *or* babbleSpell = BabbleLib:GetInstance("Spell 1.1"); name = babbleSpell:GetLocalized("IMPROVED_REINCARNATION"); *do* work however. Note that in the 1.0 instance, it uses "babble.GetLocalizedSpell", and in the "Spell 1.1" version, it must use "babbleSpell:GetLocalized", but parses and fails to work with "babbleSpell.GetLocalized". I clearly don't understand enough about the language or gammar of LUA. But. As you note, your test above works. And if I did: /print BabbleLib:GetInstance("1.0"):GetLocalizedSpell("IMPROVED_REINCARNATION") it also worked. It was after that test that I tried using a ':' instead of the '.', which fixed it. (*shrug*) Thanks for your help. The first solution (just quoting the arg, still using instance 1.0 code) works, and will be fixed in the source. |