Documentation ¶
Index ¶
- Constants
- func BleveSupportedAnalyzer(tag language.Tag) (ok bool)
- func GetPrinterFromRequest(r *http.Request) (printer *message.Printer)
- func GetTag(r *http.Request) (tag language.Tag)
- func NewCatalogPrinter(lang string, c catalog.Catalog) (tag language.Tag, printer *message.Printer)
- func NonPageRequested(r *http.Request) (isNonPage bool)
- func ParseLangPath(p string) (tag language.Tag, modified string, ok bool)
- func PruneTranslatorComments(raw string) (clean string)
- func SetTag(r *http.Request, tag language.Tag) (modified *http.Request)
- func SortLanguageTags(tags []language.Tag) (sorted []language.Tag)
- func SortedLanguageTagKeys[V interface{}](m map[language.Tag]V) (sorted []language.Tag)
- func TagInTagSlices(needle language.Tag, haystacks ...[]language.Tag) (found bool)
- func TagInTags(needle language.Tag, haystack ...language.Tag) (found bool)
- type DomainMode
- func (p *DomainMode) FromRequest(defaultTag language.Tag, r *http.Request) (tag language.Tag, path string, ok bool)
- func (p *DomainMode) Make() Mode
- func (p *DomainMode) Name() (name string)
- func (p *DomainMode) Set(tag language.Tag, domain string) DomainModeBuilder
- func (p *DomainMode) ToUrl(defaultTag, tag language.Tag, path string) (translated string)
- type DomainModeBuilder
- type Mode
- type PathMode
- func (p *PathMode) FromRequest(defaultTag language.Tag, r *http.Request) (tag language.Tag, path string, ok bool)
- func (p *PathMode) Make() Mode
- func (p *PathMode) Name() (name string)
- func (p *PathMode) ParsePathLang(path string) (tag language.Tag, trimmed string, ok bool)
- func (p *PathMode) SetDomain(domain string) PathModeBuilder
- func (p *PathMode) ToUrl(defaultTag, tag language.Tag, path string) (translated string)
- type PathModeBuilder
- type QueryMode
- func (q *QueryMode) FromRequest(defaultTag language.Tag, r *http.Request) (tag language.Tag, path string, ok bool)
- func (q *QueryMode) Make() Mode
- func (p *QueryMode) Name() (name string)
- func (q *QueryMode) SetDomain(domain string) QueryModeBuilder
- func (q *QueryMode) SetQueryParameter(name string) QueryModeBuilder
- func (q *QueryMode) ToUrl(defaultTag, tag language.Tag, path string) (translated string)
- type QueryModeBuilder
- type Tags
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func BleveSupportedAnalyzer ¶
func NewCatalogPrinter ¶
func NonPageRequested ¶
func PruneTranslatorComments ¶ added in v0.5.0
func SortedLanguageTagKeys ¶
func TagInTagSlices ¶
Types ¶
type DomainMode ¶
type DomainMode struct {
// contains filtered or unexported fields
}
func (*DomainMode) FromRequest ¶
func (*DomainMode) Make ¶
func (p *DomainMode) Make() Mode
func (*DomainMode) Name ¶ added in v0.5.0
func (p *DomainMode) Name() (name string)
func (*DomainMode) Set ¶
func (p *DomainMode) Set(tag language.Tag, domain string) DomainModeBuilder
type DomainModeBuilder ¶
type DomainModeBuilder interface { Set(tag language.Tag, domain string) DomainModeBuilder Make() Mode }
func NewDomainMode ¶
func NewDomainMode() (p DomainModeBuilder)
type PathMode ¶
type PathMode struct {
// contains filtered or unexported fields
}
func (*PathMode) FromRequest ¶
func (*PathMode) ParsePathLang ¶
func (*PathMode) SetDomain ¶
func (p *PathMode) SetDomain(domain string) PathModeBuilder
type PathModeBuilder ¶
type PathModeBuilder interface { SetDomain(domain string) PathModeBuilder Make() Mode }
func NewPathMode ¶
func NewPathMode() (p PathModeBuilder)
type QueryMode ¶
type QueryMode struct {
// contains filtered or unexported fields
}
func (*QueryMode) FromRequest ¶
func (*QueryMode) SetDomain ¶
func (q *QueryMode) SetDomain(domain string) QueryModeBuilder
func (*QueryMode) SetQueryParameter ¶
func (q *QueryMode) SetQueryParameter(name string) QueryModeBuilder
type QueryModeBuilder ¶
type QueryModeBuilder interface { SetDomain(domain string) QueryModeBuilder SetQueryParameter(name string) QueryModeBuilder Make() Mode }
func NewQueryMode ¶
func NewQueryMode() (q QueryModeBuilder)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.