bundle

package
v0.0.0-...-4500e45 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2014 License: BSD-2-Clause-Views, MIT Imports: 6 Imported by: 0

Documentation

Overview

Package bundle manages translations for multiple locales.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bundle

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

func New

func New() *Bundle

func (*Bundle) AddTranslation

func (b *Bundle) AddTranslation(locale *locale.Locale, translations ...translation.Translation)

func (*Bundle) LoadTranslationFile

func (b *Bundle) LoadTranslationFile(filename string) error

func (*Bundle) MustLoadTranslationFile

func (b *Bundle) MustLoadTranslationFile(filename string)

func (*Bundle) MustTfunc

func (b *Bundle) MustTfunc(localeID string, localeIDs ...string) TranslateFunc

func (*Bundle) Tfunc

func (b *Bundle) Tfunc(localeID string, localeIDs ...string) (tf TranslateFunc, err error)

func (*Bundle) Translations

func (b *Bundle) Translations() map[string]map[string]translation.Translation

type TranslateFunc

type TranslateFunc func(translationID string, args ...interface{}) string

TranslateFunc is a copy of i18n.TranslateFunc to avoid a circular dependency.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL