Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding New Language (Persian) #152

Closed
ghost1372 opened this issue Aug 2, 2020 · 11 comments · Fixed by #153
Closed

Adding New Language (Persian) #152

ghost1372 opened this issue Aug 2, 2020 · 11 comments · Fixed by #153

Comments

@ghost1372
Copy link
Contributor

Hello, thank you for your ModernWpf
If you agree, I wanted to add Persian language
Do I need to translate anything other than this file?
https://github.com/Kinnara/ModernWpf/blob/master/ModernWpf/Resources/Strings.resx

@Kinnara
Copy link
Owner

Kinnara commented Aug 4, 2020

Thank you. There is another file in the ModernWpf.MahApps project. For the existing languages I didn't actually translate anything—I try to get the translations from WinUI, and if they are not available, from the corresponding Windows language pack. This way we're consistent with Windows. The same can probably be done for Persian. I can do it if it's too much trouble. BTW is this a correct file for Persian 😅?

@ghost1372
Copy link
Contributor Author

Oh, so that's it😀
Yes this file is correct, I can open a PR for this

@ShankarBUS
Copy link
Contributor

  • @Kinnara, Shouldn't this library support all the languages that WinUI supports?

  • @ghost1372, Instead of adding support for just only one language, could you also add support for all the other languages supported by WinUI?

@ghost1372
Copy link
Contributor Author

@ShankarBUS I'm sorry, but I do not have enough time to do this There are too many languages (68), Also, adding all languages is not a good thing in my opinion Every file must be modified for each change. It is very time consuming Unfortunately, Microsoft did not put all the resources in one file and the resource created each control separately.

@milos12345
Copy link

Regarding languages, build creates a bunch of folders in bin\release with ModernWpf.resources.dll in them. Is there a way to prevent this?

@ghost1372
Copy link
Contributor Author

@milos12345 you can write a PostBuild-Event in visual studio (Right Click Project and Properties\Build event) that delete extra folders each time you build

rd /s /q de
rd /s /q fr

Kinnara pushed a commit that referenced this issue Aug 9, 2020
@Kinnara
Copy link
Owner

Kinnara commented Aug 9, 2020

  • @Kinnara, Shouldn't this library support all the languages that WinUI supports?

In theory, yes. In practice, adding a language can be time-consuming and error-prone, since currently the WinUI repo doesn’t contain all the required string resources. So initially I added only the languages that have corresponding string resources in .NET itself. The rest can be added as required.

@ShankarBUS
Copy link
Contributor

Could that be possible once WinUI 3 is open sourced

@Kinnara
Copy link
Owner

Kinnara commented Aug 9, 2020

Could that be possible once WinUI 3 is open sourced

Very likely.

@Kinnara Kinnara linked a pull request Aug 9, 2020 that will close this issue
@Kinnara
Copy link
Owner

Kinnara commented Aug 9, 2020

Regarding languages, build creates a bunch of folders in bin\release with ModernWpf.resources.dll in them. Is there a way to prevent this?

The SatelliteResourceLanguages MSBuild property also seems to work.

@ShankarBUS
Copy link
Contributor

ShankarBUS commented Nov 6, 2020

@Kinnara

In theory, yes. In practice, adding a language can be time-consuming and error-prone, since currently the WinUI repo doesn’t contain all the required string resources. So initially I added only the languages that have corresponding string resources in .NET itself. The rest can be added as required.

If #202 were to be implemented, this would be a trivial task!

@ghost1372 ghost1372 reopened this Nov 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants