lang

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: BSD-3-Clause Imports: 4 Imported by: 1

README

github.com/AlvinRamoutar/go-framework/lang

Language module with a linked relationship to all other github.com/AlvinRamoutar/go-framework modules. Builds a language dictionary per module, per language. Each code represents a unique string.

Objective is to make this extensible to all modules and projects consuming github.com/AlvinRamoutar/go-framework without implementing project-specific strings.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var VERSION string = "0.0.1"

Functions

This section is empty.

Types

type Lang

type Lang struct {
	Language string
	Data     map[string]string
}

Key format is [AABBBCCCCDDD] where

  • AA is language 2-char shortcode (e.g. EN, FR)
  • BBB is type 3-char shortcode (e.g. SVC, LIB)
  • CCCC is type name 4-char shortcode (e.g. LANG, CORE)
  • DDD is phrase unique 3-digit numerical id (e.g. 001, 999)

func (*Lang) AsyncStart

func (l *Lang) AsyncStart() error

func (*Lang) Extend

func (l *Lang) Extend(ext map[string]string)

func (*Lang) Get

func (l *Lang) Get(key string) string

func (*Lang) Init

func (l *Lang) Init() error

func (*Lang) Restart

func (l *Lang) Restart() error

func (*Lang) Set

func (l *Lang) Set(language string)

func (*Lang) Start

func (l *Lang) Start() error

func (*Lang) Status

func (l *Lang) Status() (string, error)

func (*Lang) Stop

func (l *Lang) Stop() error

func (*Lang) Version

func (l *Lang) Version() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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