lang

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 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 Service

type Service interface {
	// Define the language to translate from and to
	//
	// Example:
	//   - fromLang: en_us
	//   - toLang: pt_br
	SetLang(fromLang string, toLang string)

	// Translate the lang files
	//
	// Example:
	//   - inputFolder: ./my/mod/lang
	//   - outputFolder: ./my/mod/lang
	Translate(inputFolder string, outputFolder string) error
}

Service responsible to merge lang files and translate each one

Example:

  • input: en_us.json
  • output: pt_br.json

func New

func New(db db.Service, translate engine.Service) Service

Jump to

Keyboard shortcuts

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