i18n

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package i18n provides internationalization support for the CLI

Index

Constants

This section is empty.

Variables

View Source
var LanguageNames = map[string]string{
	"en": "English",
	"pt": "Português",
	"fr": "Français",
	"es": "Español",
}

LanguageNames maps language codes to display names

View Source
var SupportedLanguages = []string{"en", "pt", "fr", "es"}

SupportedLanguages lists all available languages

Functions

func CurrentLanguage

func CurrentLanguage() string

CurrentLanguage returns the current language code

func Init

func Init(lang string) error

Init initializes the i18n system with the specified language

func IsSupported

func IsSupported(lang string) bool

IsSupported checks if a language is supported

func T

func T(key string) string

T translates a message by key

func Tf

func Tf(key string, data map[string]interface{}) string

Tf translates a message with template data

Types

This section is empty.

Jump to

Keyboard shortcuts

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