i18n

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2026 License: MIT Imports: 6 Imported by: 0

README

togo-framework/i18n

A togo provider plugin. Install:

togo install togo-framework/i18n

It self-registers with the kernel on import. MIT.

Documentation

Overview

Package i18n is togo's default JSON-file translator provider. Blank-import (or `togo install togo-framework/i18n`) to register it with the kernel.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(dir, fallback string) togo.Translator

Load reads every <locale>.json in dir (missing dir is fine).

Types

type Bundle

type Bundle struct {
	// contains filtered or unexported fields
}

Bundle holds loaded locales and satisfies togo/i18n.Translator.

func (*Bundle) T

func (b *Bundle) T(locale, key string) string

T translates key for locale, falling back to the fallback locale then the key.

Jump to

Keyboard shortcuts

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