MustLoadMessageFile() takes a path that follows the file naming convention of xxx.en.json and automatically parses the language tag. This incorrectly retrieves the language tag if the path does not follow the convention. In my case, the locales path is locales/en/translation.json. Passing this path to MustLoadMessageFile() will result in the langTag being translation instead of en. It'd be super helpful if either the function could also parse the aforementioned path or accept an optional langTag arg to override the automatic parsing.
MustLoadMessageFile()
takes a path that follows the file naming convention ofxxx.en.json
and automatically parses the language tag. This incorrectly retrieves the language tag if the path does not follow the convention. In my case, the locales path islocales/en/translation.json
. Passing this path toMustLoadMessageFile()
will result in the langTag beingtranslation
instead ofen
. It'd be super helpful if either the function could also parse the aforementioned path or accept an optional langTag arg to override the automatic parsing.