codingseb / Localization

A suite to localize C# and WPF projects easily based on file format you choose.
MIT License
37 stars 6 forks source link

Is support JSON Array? #4

Closed azhe403 closed 2 years ago

azhe403 commented 2 years ago

To avoid write long text single line, is any support JSON array string like this?

{
  "SomeString": {
    "id": [
      "Lorem Ipsum is simply dummy text of the printing and typesetting industry. ",
      "\nLorem Ipsum has been the industry's standard dummy text ever since the 1500s",
      "\nwhen an unknown printer took a galley of type and scrambled it to make a type specimen book.."
    ],
    "en": [
      "Lorem Ipsum is simply dummy text of the printing and typesetting industry. ",
      "\nLorem Ipsum has been the industry's standard dummy text ever since the 1500s",
      "\nwhen an unknown printer took a galley of type and scrambled it to make a type specimen book.."
    ]
  }
}

I got this exception image

codingseb commented 2 years ago

Hello @azhe403. Sorry for my late answer. Arrays are not supported by the default CodingSeb.Localization.JsonFileLoader.

But you could implement your own ILocalizationFileLoader and make a loader that support it. You can base it on JsonFileLoader.cs