locale

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Language

type Language string
const (
	English Language = "en"
	Arabic  Language = "ar"
	Turkish Language = "tr"
	Persian Language = "fa"
)

type Locale

type Locale interface {
	Message(lang Language, key string, params ...interface{}) string
}

func NewFromDir

func NewFromDir(dirname string) (Locale, error)

NewFromDir create a Locale instance from files with name format of `bundle_[LANGUAGE_TAG].json` inside the directory.

Jump to

Keyboard shortcuts

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