Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function ServTr:CheckColor(text)
- _, _, color, text = string.find(text, "(|cff%x%x%x%x%x%x)(.+)|r")
- if color and text then
- return text, color
- else
- return text
- end
- end
- function ServTr:GetText(db,text)
- if not text then return nil end
- local color, trans_text
- text, color = self:CheckColor(text)
- db = _G[self.db.profile.language.."_"..db]
- if type(db)=="table" and db[text] then
- trans_text = db[text]
- if color then
- trans_text = color..trans_text.."|r"
- end
- return self:prepare(trans_text)
- end
- return nil
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement