You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In v1 it was possible to handle "custom languages" by registering a new plural spec based on the english one.
In v2, the language handling is a little bit more unclear (hidden).
If I try to parse a language file with the name klingon.toml:
m, err:=bundle.ParseMessageFileBytes([]byte("[hello]\nother = \"nuqneH\""), "klingon.toml")
I get a Message with language.Undefined in return. This sounds like an error to me, but my main challenge here is: How do I define a new language? I have tried to read up on how golang.org/x/text/language works, but I cannot find a way to register a new language.
In v1 it was possible to handle "custom languages" by registering a new plural spec based on the english one.
In v2, the language handling is a little bit more unclear (hidden).
If I try to parse a language file with the name
klingon.toml
:I get a
Message
withlanguage.Undefined
in return. This sounds like anerror
to me, but my main challenge here is: How do I define a new language? I have tried to read up on howgolang.org/x/text/language
works, but I cannot find a way to register a new language.See gohugoio/hugo#5242
The text was updated successfully, but these errors were encountered: