Skip to content

Missing JSON support. #12

@davidnewhall

Description

@davidnewhall

https://github.com/invopop/ctxi18n/blob/95a38ee64467b3fb070ace8f2097f38684be9742/i18n/locales.go#L37C13-L37C18

But fixing this still won't allow me to use this library. :( All my translation files are in a format that is "close" to what's supported by this library, but my files are not lists and they do not begin with a language code. Just simple json files with keys and sub keys and the language code is the name the file. ie en.json.

If you could somehow expose the unmarshaller, it would allow me to pre-process my json files before passing them in. Other libraries handle this by making the unmarshaller a user-provided value (with a default that matches the found file extension). This would be ideal because then I could still Use Load, and just write a small function to transform my json on the fly as it's read in.

Thanks for your consideration!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions