plural

package
v6.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2014 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package plural defines CLDR plural categories.

Index

Constants

View Source
const (
	Invalid Category = "invalid"
	Zero             = "zero"
	One              = "one"
	Two              = "two"
	Few              = "few"
	Many             = "many"
	Other            = "other"
)

All defined plural categories.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category string

Category represents a language pluralization form as defined here: http://cldr.unicode.org/index/cldr-spec/plural-rules

func NewCategory

func NewCategory(src string) (Category, error)

NewCategory returns src as a Category or Invalid and a non-nil error if src is not a valid Category.

type Operands

type Operands struct {
	N float64 // absolute value of the source number (integer and decimals)
	I int64   // integer digits of n
	V int     // number of visible fraction digits in n, with trailing zeros
	W int     // number of visible fraction digits in n, without trailing zeros
	F int     // visible fractional digits in n, with trailing zeros
	T int     // visible fractional digits in n, without trailing zeros
}

http://unicode.org/reports/tr35/tr35-numbers.html#Operands

func NewOperands

func NewOperands(v interface{}) (*Operands, error)

Jump to

Keyboard shortcuts

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