API Documentation

Note: This documentation is auto-generated. Please note that direct modifications may be overwritten on next autogenerate.

:GetBaseLookupTable()

Notes

If you try to access a nonexistent key, it will return nil.

This is useful for checking if the base (English) table has a key, even if the localized one does not have it registered.

Returns

A lookup table for english to localized words.

Example

local B = LibStub("LibBabble-Module-3.0") -- where Module is what you want.
local B_hasBase = B:GetBaseLookupTable()
assert(B_hasBase["Some english word"] == "Some english word")
assert(B_hasBase["Some english word that doesn't exist"] == nil)

:GetLookupTable()

Notes

If you try to access a nonexistent key, it will warn but allow the code to pass through.

Returns

A lookup table for english to localized words.

Example

local B = LibStub("LibBabble-Module-3.0") -- where Module is what you want.
local BL = B:GetLookupTable()
assert(BL["Some english word"] == "Some localized word")
DoSomething(BL["Some english word that doesn't exist"]) -- warning!

:GetReverseIterator("key")

Arguments

"key"

string - the localized word to chek for.

Returns

An iterator to traverse all English words that map to the given key

Example

local B = LibStub("LibBabble-Module-3.0") -- where Module is what you want.
for word in B:GetReverseIterator("Some localized word") do
DoSomething(word)
end

:GetReverseLookupTable()

Notes

If you try to access a nonexistent key, it will return nil.

This will return only one English word that it maps to, if there are more than one to check, see :GetReverseIterator("word")

Tools

Content is available under CC BY-NC-SA 3.0 unless otherwise noted.Game content and materials are trademarks and copyrights of their respective publisher and its licensors. All rights reserved.
This site is a part of Wikia, Inc. and is not affiliated with the game publisher.