rasyidf / Rasyidf.Localization

Universal Localization Framework for WPF
https://rasyidf.github.io/Rasyidf.Localization/
MIT License
7 stars 5 forks source link

Feature request: Group content by key #1

Closed 3r4i closed 4 years ago

3r4i commented 4 years ago

First of all, thank you for providing such a useful tool for WPF localization.

But I am missing a important feature: Is there any way to group the content of the language pack (in my case json) by the key?

Thank you in advance.

Expected Behavior

{
     "Languages": [
        {
       "EnglishName": "English",
           "CultureName": "English - United States",
           "Culture": "en-US"
        },
        {
       "EnglishName": "Indonesian",
           "CultureName": "Bahasa Indonesia",
           "Culture": "id-ID"
        }
    ],
    "Data": [ 
        { 
      "Id": 0, 
      "Language": {
        "English": "Window Title",
        "Indonesian": "Judul Jendela"
      }
        },
    { 
      "Id": 11, 
      "Language": {
        "English": "File",
        "Indonesian": "Berkas"
      }
        }
    ]

}

Current Behavior

{
    "EnglishName": "Indonesian", "CultureName": "Bahasa Indonesia",
    "Culture": "id-ID",
    "Data": [ 
        { "Id": 0, "Header": "Judul Jendela" }, 
        { "Id": 11, "Header": "Berkas" }
    ]
}
rasyidf commented 4 years ago

Thank you for using this, and of course your suggestion. currently it isn't possible to do that, but single package for language maybe good approach as if it's just supporting some language.

I'll try to implement that as soon as possible.

rasyidf commented 4 years ago

Thanks to you, i've found some structural error after playing with multiple language at same file.