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

Localization does not work #236

Open
waleedmakarem opened this issue May 14, 2022 · 7 comments
Open

Localization does not work #236

waleedmakarem opened this issue May 14, 2022 · 7 comments

Comments

@waleedmakarem
Copy link

I am trying to apply localization to it, but it does not work. I have tried normal button and kryptonbutton at same form, and applied below code. Normal button will localize , but kryptonbutton does not . Does KryptonToolkit support localization ? Below is my code:
NB. Windows set to Localizable

For Each c As Control In Me.Controls
Dim crmLang As ComponentResourceManager = New ComponentResourceManager(GetType(Form1))
crmLang.ApplyResources(c, c.Name, New CultureInfo(Language)) 'Set desired language
Next c

@Wagnerp
Copy link
Contributor

Wagnerp commented Jun 29, 2022

Hi @waleedmakarem

By setting the localization, do you mean for button text

@waleedmakarem
Copy link
Author

Hi Wagnerp,
Yes, I cannot localize KryptonButton Text property , though I can localize default WinformButton.

@Wagnerp
Copy link
Contributor

Wagnerp commented Aug 2, 2022

Hi @waleedmakarem

Do you mean no RTL support or something else?

@waleedmakarem
Copy link
Author

I mean to have different language support, eg English , French , German. Normally below code should localize all winform controls , but does not work for Krypton controls

For Each c As Control In Me.Controls
Dim resources As ComponentResourceManager = New ComponentResourceManager(GetType(Form1))
resources.ApplyResources(c, c.Name, New CultureInfo(lang))
Next c

@Wagnerp
Copy link
Contributor

Wagnerp commented Oct 24, 2022

@waleedmakarem You can alter certain strings within KryptonManager

@waleedmakarem
Copy link
Author

No. I need to localize the entire winforms. with below code. it works for normal winform button control, eg. But if i used kryptonButton, it does not work. If you need to share project. I can.

Private Sub btnchangetoEnglish_Click(sender As Object, e As EventArgs) Handles btnchangetoEnglish.Click
ChangeLanguage("en")
End Sub

Private Sub ChangeLanguage(ByVal lang As String)
    For Each c As Control In Me.Controls
        Dim resources As ComponentResourceManager = New ComponentResourceManager(GetType(Form1))
        resources.ApplyResources(c, c.Name, New CultureInfo(lang))
    Next c
End Sub

@Wagnerp
Copy link
Contributor

Wagnerp commented Dec 9, 2022

@waleedmakarem Does this help? Krypton-Suite/Standard-Toolkit#851

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

No branches or pull requests

2 participants