messageformat

package
v1.13.2 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2019 License: MIT Imports: 4 Imported by: 0

README

messageformat

GoDoc

Simplified MessageFormat Go implementation.

Basic usage
import (
  "libs.altipla.consulting/messageformat"
)

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.

Jump to

Keyboard shortcuts

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