hugo: github.com/gohugoio/hugo/i18n Index | Files

package i18n

import "github.com/gohugoio/hugo/i18n"

Index

Package Files

i18n.go translationProvider.go

type TranslationProvider Uses

type TranslationProvider struct {
    // contains filtered or unexported fields
}

TranslationProvider provides translation handling, i.e. loading of bundles etc.

func NewTranslationProvider Uses

func NewTranslationProvider() *TranslationProvider

NewTranslationProvider creates a new translation provider.

func (*TranslationProvider) Clone Uses

func (tp *TranslationProvider) Clone(d *deps.Deps) error

Clone sets the language func for the new language.

func (*TranslationProvider) Update Uses

func (tp *TranslationProvider) Update(d *deps.Deps) error

Update updates the i18n func in the provided Deps.

type Translator Uses

type Translator struct {
    // contains filtered or unexported fields
}

Translator handles i18n translations.

func NewTranslator Uses

func NewTranslator(b *bundle.Bundle, cfg config.Provider, logger *jww.Notepad) Translator

NewTranslator creates a new Translator for the given language bundle and configuration.

func (Translator) Func Uses

func (t Translator) Func(lang string) bundle.TranslateFunc

Func gets the translate func for the given language, or for the default configured language if not found.

Package i18n imports 7 packages (graph) and is imported by 2 packages. Updated 2017-06-13. Refresh now. Tools for package owners.