Documentation ¶
Overview ¶
Package pomsg provides a PO file implementation for Soy message bundles
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dir ¶
Dir returns a soymsg.Provider that takes translations from the given path. For example, if dir is "/usr/local/msgs", po files should be of the form:
/usr/local/msgs/<lang>.po /usr/local/msgs/<lang>_<territory>.po
TODO: Fallbacks between <lang> and <lang>_<territory>
func Load ¶
func Load(opener FileOpener, locales []string) (soymsg.Provider, error)
Load returns a soymsg.Provider that takes its translations by passing in the specifified locales to the given PoFileProvider.
TODO: Fallbacks between <lang> and <lang>_<territory>
func MsgidPlural ¶
MsgPlural returns the msgid_plural for the given message.
Types ¶
type FileOpener ¶
type FileOpener interface { // Open returns ReadCloser for the po file indicated by locale. It returns // nil if the file does not exist Open(locale string) (io.ReadCloser, error) }
FileOpener defines an abstraction for opening a po file given a locale
Directories ¶
Path | Synopsis |
---|---|
xgettext-soy is a tool to extract messages from Soy templates in the PO (gettext) file format.
|
xgettext-soy is a tool to extract messages from Soy templates in the PO (gettext) file format. |
Click to show internal directories.
Click to hide internal directories.