Translate Field Flag

Julian C. asked on May 6, 2022 20:04

Kentico version 10.

I noticed when using language culture, the page gets translated fine except the custom widgets.

When I go to the widget properties and select the text field I don't get the Translate field checkbox as described here: https://docs.xperience.io/k11/multilingual-websites/configuring-translation-services/configuring-content-for-translation

How would I enable the Translate Field Flag on custom widgets (not web parts!).

Thanks

Recent Answers


vasu yerramsetti answered on May 7, 2022 07:24

Every widget is based on a web part. You can create widgets with the same functionality as most web parts in the system. If you require a widget with completely new custom functionality, you need to develop an appropriate web part first.

https://docs.xperience.io/k10/developing-websites/preparing-widgets-for-users/creating-widgets

Kentico default provide Translate field option for Web part property not for Widget property. If you want to this as widget property then first create property on web part and allow on widget.

1 votesVote for this answer Mark as a Correct answer

Julian C. answered on May 9, 2022 18:31

Thanks Vasu, the web part has the "Translate field" checked but refuses to translate the custom widget. And yes, I did go over the Language documentation few times.

"Translate web part properties" is checked under "Translation Properties". Also, "Automatically import translated submissions" is also checked.

Google Translation API works just fine because the page gets translated with the default Kentico widgets except for the custom widgets.

I tried hundreds of times, deleted the page versions, clear the cache, restarted the server... with no luck.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on May 10, 2022 05:51

You have to provide values for those fields for them to be translated in the property definitions on the widget you hover over the property's text box and it should bring up a gray plus sign in the upper right. Use that to create a new localization key and string this should get you what you need.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.