messageformat

package module
v0.0.0-...-f81bb4a Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2018 License: MIT Imports: 3 Imported by: 1

README

messageformat

DEPRECATED: Use https://github.com/altipla-consulting/libs instead.

GoDoc Build Status

Simplified MessageFormat Go implementation.

Install
go get github.com/altipla-consulting/messageformat

This library does not have dependencies outside the standard library.

Contributing

You can make pull requests or create issues in GitHub. Any code you send should be formatted using gofmt.

Running tests

Run the tests

make test
License

MIT License

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageFormat

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

MessageFormat instance containing a message that can be formatted.

func New

func New(message string) (*MessageFormat, error)

New parses the message using the MessageFormat specification.

func (*MessageFormat) Format

func (msg *MessageFormat) Format(lang string, params []interface{}) (string, error)

Format the message to replace the params and select the plurals and genders.

Jump to

Keyboard shortcuts

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