i18n

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FileMemory stores persistent information and context
	FileMemory = "MEMORY.md"
	// FileIdentity stores agent identity and personality
	FileIdentity = "IDENTITY.md"
	// FileAgents stores information about other agents
	FileAgents = "AGENTS.md"
	// FileSoul stores agent identity and personality
	FileSoul = "SOUL.md"
	// FileUser stores user information and preferences
	FileUser = "USER.md"
	// FileBootstrap stores initial greeting and setup instructions (deleted after boot)
	FileBootstrap = "BOOTSTRAP.md"
	// FileTools stores information about available tools (optional, can be generated from agent configuration)
	FileTools = "TOOLS.md"
)

Variables

View Source
var SupportedLocales = []string{"en", "zh"}

SupportedLocales lists the locales that are currently supported

Functions

func GetLocalizedFilePath

func GetLocalizedFilePath(baseDir, filename, locale string) string

GetLocalizedFilePath returns the path to a localized file if it exists, otherwise returns the default file path. For example, if locale is "zh" and filename is "SOUL.md", it will try "SOUL.zh.md" first, then fall back to "SOUL.md".

func GetTemplateContent

func GetTemplateContent(filename, locale string) (string, error)

GetTemplateContent returns the content of a template file for a given locale. It first tries to read from the embedded filesystem, then falls back to en.

func InitializeWorkspace

func InitializeWorkspace(baseDir, locale string) error

InitializeWorkspace creates the workspace files from templates if they don't exist

func ValidateLocale

func ValidateLocale(locale string) error

ValidateLocale checks if a locale is supported

Types

This section is empty.

Jump to

Keyboard shortcuts

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