Documentation ¶
Index ¶
- Variables
- type LanguageExtractordeprecated
- type LanguageExtractorOptionsdeprecated
- type Translatordeprecated
Constants ¶
This section is empty.
Variables ¶
var CookieLanguageExtractor = i18nm.CookieLanguageExtractor
CookieLanguageExtractor is a LanguageExtractor implementation, using a cookie.
Deprecated: use github.com/gobuffalo/mw-i18n#CookieLanguageExtractor instead.
var HeaderLanguageExtractor = i18nm.HeaderLanguageExtractor
HeaderLanguageExtractor is a LanguageExtractor implementation, using a HTTP Accept-Language header.
Deprecated: use github.com/gobuffalo/mw-i18n#HeaderLanguageExtractor instead.
var New = i18nm.New
New Translator. Requires a packd.Box that points to the location of the translation files, as well as a default language. This will also call t.Load() and load the translations from disk.
Deprecated: use github.com/gobuffalo/mw-i18n#New instead.
var SessionLanguageExtractor = i18nm.SessionLanguageExtractor
SessionLanguageExtractor is a LanguageExtractor implementation, using a session.
Deprecated: use github.com/gobuffalo/mw-i18n#SessionLanguageExtractor instead.
var URLPrefixLanguageExtractor = i18nm.URLPrefixLanguageExtractor
URLPrefixLanguageExtractor is a LanguageExtractor implementation, using a prefix in the URL.
Deprecated: use github.com/gobuffalo/mw-i18n#URLPrefixLanguageExtractor instead.
Functions ¶
This section is empty.
Types ¶
type LanguageExtractor
deprecated
added in
v0.12.0
type LanguageExtractor = i18nm.LanguageExtractor
LanguageExtractor can be implemented for custom finding of search languages. This can be useful if you want to load a user's language from something like a database. See Middleware() for more information on how the default implementation searches for languages.
Deprecated: use github.com/gobuffalo/mw-i18n#LanguageExtractor instead.
type LanguageExtractorOptions
deprecated
added in
v0.12.0
type LanguageExtractorOptions = i18nm.LanguageExtractorOptions
LanguageExtractorOptions is a map of options for a LanguageExtractor.
Deprecated: use github.com/gobuffalo/mw-i18n#LanguageExtractorOptions instead.
type Translator
deprecated
type Translator = i18nm.Translator
Translator for handling all your i18n needs.
Deprecated: use github.com/gobuffalo/mw-i18n#Translator instead.