Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to localize radio-button inside admin interface in Kentico

I have a custom Page Type with ArticleType field presented by Radio Buttons control with the following list of options:

News Event

My website has EN and DE cultures. What I want to do is if content editor edits the page on German he sees:

Nachrichten Veranstaltung

But if he switches to English, he would see:

News Event

But the actual value saved in the database would be "news" or "event". How can I make it within Kentico admin interface?

image here

like image 400
Max Avatar asked Dec 15 '25 14:12

Max


1 Answers

The solution proposed by Peter will display the same localization string even if you switch to another language in Pages application because it will use the culture of the user but not the culture of the page.

The following macro should work for you:

news;{% GetResourceString("custom.news", LocalizationContext.CurrentCulture.CultureCode) #%}
events;{% GetResourceString("custom.events", LocalizationContext.CurrentCulture.CultureCode) #%}
like image 138
Dmitry Bastron Avatar answered Dec 18 '25 14:12

Dmitry Bastron



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!