...
1
2
3
4
5 package main
6
7 import (
8 "fmt"
9
10 "golang.org/x/text/language"
11 "golang.org/x/text/message"
12 )
13
14 func main() {
15 var nPizzas = 4
16
17
18 fmt.Println("We ate", nPizzas, "pizzas.")
19
20 p := message.NewPrinter(language.English)
21
22
23 p.Println(1024)
24
25
26 fmt.Println("Example punctuation:", "$%^&!")
27
28 {
29 q := message.NewPrinter(language.French)
30
31 const leaveAnIdentBe = "Don't expand me."
32 fmt.Print(leaveAnIdentBe)
33 q.Println()
34 }
35
36 fmt.Printf("Hello %s\n", "City")
37 }
38
View as plain text