Documentation
¶
Index ¶
- Constants
- type I18nFS
- func (i *I18nFS) GetLanguages() []string
- func (i *I18nFS) GetValByPath(lang string, path string) (any, error)
- func (i *I18nFS) HasLang(lang string) bool
- func (i *I18nFS) IsLangExists(lang string) bool
- func (i *I18nFS) ParseTemplateString(stringVal string, lang string) any
- func (i *I18nFS) Read(lang string) error
- func (i *I18nFS) WalkLangYAML(lang string, walkFunc func(content string)) error
Constants ¶
View Source
const DefaultTemplatePlaceholder = "<NotFound>"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type I18nFS ¶
type I18nFS struct { LangFSEmbed *embed.FS FSPrefix string FsMode i18nfs.FSMode // contains filtered or unexported fields }
func (*I18nFS) GetLanguages ¶
GetLanguages get list of languages
func (*I18nFS) GetValByPath ¶
GetValByPath get value by paths which are split by dot
func (*I18nFS) IsLangExists ¶
IsLangExists check language exists or not on filesystem
func (*I18nFS) ParseTemplateString ¶
ParseTemplateString parse path in template to refer others string format of template like "${path}"
Click to show internal directories.
Click to hide internal directories.