This is a little library to translate localized race names to english names like "Mensch" to "Human". (Female and male names)
lib = LibStub("LibRaces-1.0")
lib:GetRaceToken(<raceName>)
Example:
"NightElf", "Night Elf" = lib:GetRaceToken("Elfe de la nuit")
Arguments:
- raceName - race name (all client supported languages)
Return values:
- englishToken - english version without spacer like realm name behind character names
lib:GetRaceName(<raceName>[,<languageCode>[,<gender>]])
Examples:
-- Orc [english to italian] "Orco", "Orchessa" = lib:GetRaceName("Orc","itIT")
-- Blood Elf [Russian to female portuguese] "Elfa Sangrenta" = lib:GetRaceName("Эльф крови","ptPT",2)
Arguments:
- raceName - race name (all client supported languages)
- languageCode - deDE, enGB, enUS, esES, esMX, frFR, itIT, koKR, ptBR, ptPT, ruRU, zhCN, zhTW or de, en, es, mx, fr, it, ko, pt, br, ru, cn, tw
- genderIndex - 0=Neutral, 1=Male, 2=Female
Return values without 3. argument:
- raceNameMale - male race name in choosen language
- raceNameFemale - female race name in choosen language
Return values with 3. argument:
- raceName - neutral, male or female race name in choosen language
lib:GetLanguageByRaceNamelib(<raceName>)
Example:
"deDE","enGB","enUS","frFR","itIT","ptBT","ptPT" = lib:GetLanguageByRaceName("Troll")
Arguments:
- raceName - race name (all client supported languages)
Return values:
- languageCodeN - a list of language code matching with given race name
lib:GetGenderByRaceName(<raceName>)
Example:
2, "FEMALE" = lib:GetGenderByRaceName("Nachtelfe") -- german female night elf
Arguments:
- raceName - race name (all client supported languages)
Return values:
- genderIndex - 0=Neutral, 1=Male, 2=Female
- genderName - english gender name (uppercase)
World of Warcraft© and Blizzard Entertainment© are all trademarks or registered trademarks of Blizzard Entertainment in the United States and/or other countries. These terms and all related materials, logos, and images are copyright © Blizzard Entertainment.