i18n

package
v0.0.0-...-8155ea7 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: GPL-2.0, GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContextText

type ContextText struct {
	Preferences string
	ToolPrefs   string
	Workflow    string
	WhatWorks   string
	Corrections string
	Insights    string
	Notes       string
}

ContextText contains all context-related text

type I18n

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

I18n manages internationalization

func New

func New(lang string) *I18n

New creates a new I18n instance

func (*I18n) AllTexts

func (i *I18n) AllTexts() map[Language]TextResources

AllTexts returns text resources for all languages (for multi-language support)

func (*I18n) GetLanguage

func (i *I18n) GetLanguage() Language

GetLanguage returns the current language setting

func (*I18n) Texts

func (i *I18n) Texts() TextResources

Texts returns the text resources for the configured language

func (*I18n) TextsForLang

func (i *I18n) TextsForLang(lang Language) TextResources

TextsForLang returns text resources for a specific language

type Language

type Language string

Language represents a supported language

const (
	// LangEn is English
	LangEn Language = "en"
	// LangZh is Chinese (Simplified)
	LangZh Language = "zh"
	// LangAuto automatically detects based on content
	LangAuto Language = "auto"
)

func DetectLanguage

func DetectLanguage(text string) Language

DetectLanguage attempts to detect the language from the given text

type SuggestionsText

type SuggestionsText struct {
	ToolLowSuccess     TitleDesc
	ToolUserPreference TitleDesc
	ToolUsageTrend     TitleDesc
	WorkflowPattern    TitleDesc
	ImproveAdaptation  TitleDesc
	ResponseQuality    TitleDesc
	FrequentCorrection TitleDesc
	ConfirmPreference  TitleDesc
}

SuggestionsText contains all suggestion-related text

type TextResources

type TextResources struct {
	Suggestions SuggestionsText
	Context     ContextText
}

TextResources contains all localized text resources

type TitleDesc

type TitleDesc struct {
	Title       string
	Description string
}

TitleDesc represents a title and description pair

Jump to

Keyboard shortcuts

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