Esempio n. 1
0
/*
	Returns a resource by simple name matching
*/
func (l Locale) GetResource(key string) (string, error) {
	locale := string(l)
	internal.Activate(locale)
	return internal.Request(locale, key, false)
}
Esempio n. 2
0
/*
	Resolves a resource by its hierarchical key.
*/
func (l Locale) ResolveResource(k types.HierarchicalKey) (string, error) {
	locale := string(l)
	internal.Activate(locale)
	return internal.Request(locale, string(k), true)
}