messageformat

package
v1.53.2 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2019 License: MIT Imports: 8 Imported by: 0

README

messageformat

GoDoc

Package messageformat is a simplified MessageFormat Go implementation.

Install
import (
	"libs.altipla.consulting/messageformat"
)
Contributing

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

Running tests

Run the tests:

make test
License

MIT License

Documentation

Overview

Package messageformat is a simplified MessageFormat Go implementation.

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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