i18n

command
v2.0.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Example: loading i18n messages from local JSON files.

Run:

go run ./examples/i18n

Try:

curl -H 'Accept-Language: en' localhost:8080/   # Hello, World!
curl -H 'Accept-Language: zh' localhost:8080/   # 你好,World!
curl -H 'Accept-Language: de' localhost:8080/   # falls back to en

Jump to

Keyboard shortcuts

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