GithubHelp home page GithubHelp logo

rasyidf / rasyidf.localization Goto Github PK

View Code? Open in Web Editor NEW
7.0 4.0 5.0 144 KB

Universal Localization Framework for WPF

Home Page: https://rasyidf.github.io/Rasyidf.Localization/

License: MIT License

C# 99.56% Smalltalk 0.44%
framework localization localization-using-json-files localization-kit wpf-ui wpf-platform extension

rasyidf.localization's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rasyidf.localization's Issues

NullReferenceException issue

hi why i get NullReferenceException ?

this is how i get string
string test = LocalizationService.GetString("3", "Text", "آیا مایل به تغییر زبان برنامه هستید؟");

and this is my json

{
  "Languages": [
    {
      "EnglishName": "English",
      "CultureName": "United States",
      "Culture": "en-US",
      "RTL": "false"
    },
    {
      "EnglishName": "Persian",
      "CultureName": "Farsi",
      "Culture": "fa-IR",
      "RTL": "true"
    }
  ],

  "Data": [
    {
      "data": [
        {
          "Id": 2,
          "Header": {
            "en-US": "Exit",
            "fa-IR": "بستن"
          }
        },
        {
          "Id": 3,
          "Text": {
            "en-US": "do you want to change language?",
            "fa-IR": "آیا مایل به تغییر زبان برنامه هستید؟"
          }
        },
        {
          "Id": 10,
          "Content": {
            "en-US": "Subtitle",
            "fa-IR": "زیرنویس"
          }
        }
      ]
    }
  ]
}

Can't build due to code signing

Microsoft.Common.CurrentVersion.targets (3222, 5): [MSB3322] Failed to get MD5 checksum for key file" rasyidf.pfx ". File 'C:\Users\SKProCH\RiderProjects\Rasyidf.Localization\Localization\rasyidf.pfx' not found.

Possible Solution

Disable code signing

Steps to Reproduce (for bugs)

  1. Clone repository
  2. Try to build

Feature request: Group content by key

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" }
    ]
}

ID as a String

hi can we use string instead of integer in ID?
i mean this

 "Id": 0,
          "Title": {
            "en-US": "Subtitle Downloader",
            "fa-IR": "دانلود زیرنویس"
          }

change to:

 "Id": "MainWindow_Title",
          "Title": {
            "en-US": "Subtitle Downloader",
            "fa-IR": "دانلود زیرنویس"
          }

how to use RTL

hi in json we have a RTL, so can we use this to set flowdirection?

and this code always return false

var xx = LocalizationDictionary.GetResources(culture);
Debug.WriteLine(xx.RTL);

Json localize not work in dot net Core 3 and prism mvvm

Hello i have a program that Created based on dot net core 3.1 and prism MVVM
Sometimes I get a null reference error that I reported here
Now I have a new problem, if the program runs normally everything will work fine
how we run program normally? Double Click on Exe file.

In my program, the user can right-click on every files exist in directories to run the program and pass the file name as arguments to the program

in this case Language change will no longer occur
If possible please test my app

1- git clone -b MultiLanguage https://github.com/ghost1372/SubtitleDownloader.git
2- Go to Settings View and Enable Add to Context Menu toggle
3- Close app and Right Click on any file you want and Click on Get Subtitle
4- Now Try to Change Language from Gear Icon in Titlebar (Top|Right)

also i attached a video please watch this
2020-03-25_21-50-49.zip

Decouple LanguagePackStream with LanguagePackItem

Language Pack Stream used for loading language pack file, could contains more than just one language, decoupling it will add more functionality to the stream without sacrificing the language pack item.

Expected Behavior

StreamBase separated into StreamBase and LanguagePackItem

Current Behavior

StreamBase only provided as link to file and load as resource dictionary data

Your Environment

  • Version used: 0.4
  • NET Framework : 4.6
  • Operating System : Windows 10

Demo app don't work

Error starting work due to attempt to load languages

Steps to Reproduce (for bugs)

  1. Clone repo
  2. Fix #5
  3. Build demo
  4. Try to run demo

Your Environment

  • Version used: last
  • NET Framework : 4.8
  • Operating System and version (desktop or mobile): Win 10

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.