diff options
Diffstat (limited to 'langs')
-rw-r--r-- | langs/language.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/langs/language.go b/langs/language.go index 244f6a743..a0294a103 100644 --- a/langs/language.go +++ b/langs/language.go @@ -55,21 +55,26 @@ type Language struct { Title string Weight int + // For internal use. Disabled bool // If set per language, this tells Hugo that all content files without any // language indicator (e.g. my-page.en.md) is in this language. // This is usually a path relative to the working dir, but it can be an // absolute directory reference. It is what we get. + // For internal use. ContentDir string // Global config. + // For internal use. Cfg config.Provider // Language specific config. + // For internal use. LocalCfg config.Provider // Composite config. + // For internal use. config.Provider // These are params declared in the [params] section of the language merged with the @@ -91,6 +96,7 @@ type Language struct { initErr error } +// For internal use. func (l *Language) String() string { return l.Lang } @@ -233,6 +239,7 @@ func (l Languages) IsMultihost() bool { // SetParam sets a param with the given key and value. // SetParam is case-insensitive. +// For internal use. func (l *Language) SetParam(k string, v any) { l.paramsMu.Lock() defer l.paramsMu.Unlock() @@ -245,6 +252,7 @@ func (l *Language) SetParam(k string, v any) { // GetLocal gets a configuration value set on language level. It will // not fall back to any global value. // It will return nil if a value with the given key cannot be found. +// For internal use. func (l *Language) GetLocal(key string) any { if l == nil { panic("language not set") @@ -256,6 +264,7 @@ func (l *Language) GetLocal(key string) any { return nil } +// For internal use. func (l *Language) Set(k string, v any) { k = strings.ToLower(k) if globalOnlySettings[k] { @@ -265,11 +274,13 @@ func (l *Language) Set(k string, v any) { } // Merge is currently not supported for Language. +// For internal use. func (l *Language) Merge(key string, value any) { panic("Not supported") } // IsSet checks whether the key is set in the language or the related config store. +// For internal use. func (l *Language) IsSet(key string) bool { key = strings.ToLower(key) if !globalOnlySettings[key] { |