i18n

i18n

import "github.com/yuta-yoshinaga/go_trumpcards/internal/i18n"

Index

Constants

QuitSentinel is the internal protocol value returned by controllers on quit.

const QuitSentinel = "bye."

## func Lang

func Lang() string

Lang returns the currently active language.

## func SetLang

func SetLang(lang string)

SetLang sets the active language. Only “ja” and “en” are supported; anything else defaults to “ja”.

## func T

func T(key string) string

T returns the translation for key, falling back to the key itself if not found.

## func Tf

func Tf(key string, params ...string) string

Tf returns the translation for key with {{param}} substitutions. params should be alternating key/value pairs: Tf(“key”, “name”, “Alice”, “age”, “30”)

Generated by gomarkdoc