KevinNovak / Linguini

Npm package - A JSON-based translation file manager.
https://www.npmjs.com/package/linguini
MIT License
10 stars 1 forks source link

Allow nesting more than one time in lang json files #3

Open JanBrin opened 2 years ago

JanBrin commented 2 years ago

Allow nesting strings multiple times and access them e.g. via linguini.get("intro.newColors.coolColor", "en", TypeMappers.String);

{
    "data": {
        // This is a language category:
        "intro": {
            // This is a language item:
            "myFavoriteColor": "My favorite color is blue.",
            "newColors": {
              "coolColor": "This is my cool color"
            }
        }
    },
    "refs": {}
}
Pax-0 commented 2 years ago

honestly, this would allow for better organization of translated lines, this package is too useful as is, it will only make it better :)

Kaisarion commented 1 year ago

working on it. current form of linguini looks to encourage messiness within json, which left our file 5000+ lines with this lack of customization. have forked & will post finished product here if you still want to use it.