language

package
v0.9.8-beta-8 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Printer

func Printer() *message.Printer

Printer returns a pre-configured message.Printer. The printer can execute format statements that fix numbers for the chosen language.

func Setup

func Setup() error

Setup a message.Printer for the user or default specified language.

Example
// Setup() tries all -language flag values to find one that works.
if Setup() == nil { // No error, language configured.
	// Format a number using the language "printer".
	fmt.Println(Printer().Sprintf("%d", 1_234_567_890))
	
Output:

1,234,567,890

Types

This section is empty.

Jump to

Keyboard shortcuts

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