Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MessageCatalog ¶
MessageCatalog is the catalog of i18n messages for a given locale
func Merge ¶
func Merge(source MessageCatalog, destination MessageCatalog) MessageCatalog
Merge merges two message catalogs, preserving only keys present in source
func Parse ¶
func Parse(filename string) MessageCatalog
Parse parses the PO file into a MessageCatalog
func ParseReader ¶
func ParseReader(r io.Reader) MessageCatalog
ParseReader parses the PO file into a MessageCatalog
func (*MessageCatalog) Add ¶
func (catalog *MessageCatalog) Add(id, value string, comment []string)
Add adds a new message in the i18n catalog
func (*MessageCatalog) AddMessage ¶
func (catalog *MessageCatalog) AddMessage(id string, message Message)
AddMessage adds a new message in the i18n catalog
func (*MessageCatalog) SortedKeys ¶
func (catalog *MessageCatalog) SortedKeys() []string
SortedKeys returns the sorted keys in the catalog
func (*MessageCatalog) Write ¶
func (catalog *MessageCatalog) Write(w io.Writer)
Write writes the catalog in PO file format into w
Click to show internal directories.
Click to hide internal directories.