Example #1
0
func (c *Context) TranslationTable() *table.Table {
	if !c.hasTranslations {
		c.translations = table.Get(c.Language())
		c.hasTranslations = true
	}
	return c.translations
}
Example #2
0
func getTable(lang Languager) *table.Table {
	if lang == nil {
		return nil
	}
	if tabler, ok := lang.(Tabler); ok {
		return tabler.TranslationTable()
	}
	return table.Get(lang.Language())
}