Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
Register registers a new binary table for the given language. Keep in mind that Register is meant to be called from init and it's not thread safe. The first parameter must be either an ISO-639-1 language code, like "es" or "us", or either an ISO-639-1/ISO-3166-1-alpha2 combination, like "es_ES", "en_US" or "en_GB". Note that internally all codes are translated to uppercase and dashes are translated to underscores. This means that the languages "ES-ES", "es_es" and "es_ES" are equivalent. The second parameter is the language plural formula. The third parameter is a compressed language table. If there's already a table registered for the given language, it will be updated with the new table, adding or updating entries as required.
func Registered ¶
func Registered() []string
Types ¶
type Translation ¶
type Translation []string
Translation is the runtime representation of a translation loaded from a table.