2

We recently upgraded our Kentico 8.2 instance to 9.0 and are now focusing on localizing our site into two additional cultures. The textual content of our site is primarily stored in one of three places:

  • Editable regions
  • Text fields in custom page types
  • Custom tables

We're using the Kentico EMS license and would like to leverage the built-in Translation Services app in order to translate content in each of these locations, however it appears that it only supports with content within editable regions. I know Kentico has an input control for translating text boxes but it forces the content editor to create a distinct resource key for it; we simply have so much content I'm concerned this will get out of control for editors.

Additionally, we had considered migrating some of our content into pages but they don't logically fit there, and there are some complex relationships that would cause duplicate content so I'd really prefer to keep the content where it is. The other thought I had was to build either a custom module or custom form control to do some dirty work under the covers but didn't want to reinvent the wheel if there was already a known approach.

Is there a Kentico recommended approach, or workaround, to managing content translations within custom tables and page type fields?

  • I didn't realize that there's a "Translate Field" checkbox for page type fields that needs to be enabled –  May 23 '16 at 16:51

3 Answers3

2

You can use Translation in Kentico to translate page type fields and send them for translation. Check this documentation page for an example. It can be more complex at first, but it should do the trick for you. I have just tested creating a simple translation request for my page type and the resulting XLF file contained all page type fields.

For custom tables I will have to dissapoint you because custom tables in Kentico are not culture specific. If performance is important for you the best way to create translations is to add CultureCode field to your table in order to specify which culture the item is for.

For example you can have table with columns: ItemID, Text, CultureCode

And then the data would look like:

1, Dog, en-US

2, Hund, ge-GE

3, Pes, cs-CZ

If you would want to go even step further I would recommend to create this not as a custom table, but as a Custom class which will sit inside a custom module for which you can create your own interface which would allow editors to easily create all culture versions for the items.

Community
  • 1
  • 1
Enn
  • 2,137
  • 15
  • 24
  • This is excellent. There are a lot of relationships between some of our custom tables so we might have to do some reorganizing before we get too far but a custom module sounds like the way to go. Thanks! –  May 23 '16 at 16:53
  • Awesome, happy to have helped! Custom modules are really great in K9 and you can even generate your own Info and InfoProvider classes which means that you don't need to work with the "generic" custom table API, but you can have your custom class instead! – Enn May 23 '16 at 17:44
1

For the custom page types and custom tables, you can change those text fields to localized text fields at the field definition and it will allow you to enter different values per language without a resource key. This is the best route IMHO for page types and custom table translation. Although this still does not allow for "automatic" or built-in translation.

Brenden Kehren
  • 5,919
  • 16
  • 27
  • Kentico does support translation for pages type fields. You are correct that you can have localized fields, but that would be hard to manage and comes with additional processing as you need to resolve the resource to proper culture. – Enn May 18 '16 at 12:51
  • What I was providing @RichardŠůstek was a workaround solution to use the localizable textboxes for those fields, which is a viable solution but still does not provide any kind of "automatic" translation. Your answer does not provide any kind of automatic translation which is what the OP is looking for as well. – Brenden Kehren May 18 '16 at 13:34
  • I'm not quite sure what you mean by "automatic" translation. You can use Machine services to perform translation as mentioned here : https://docs.kentico.com/display/K9/Translating+content+using+external+services But in the end there will always need to be someone to at least approve the translation, right? :) + OP clearly wants to use the built-in translation services. – Enn May 18 '16 at 13:37
  • In my case automatic = built-in. I clarified my answer. Either way, you downvote is not appropriate as the answer does provide value and a valid answer. – Brenden Kehren May 18 '16 at 21:59
  • Sorry nitpick, but in your answer you told that page types cannot be translated using translation services which is simply not true. Using localized fields is also not the best way to localize fields for larger data set because of the performance impact and maintainability. I agree that this is technically working solution though. – Enn May 19 '16 at 07:38
  • Yes, nitpick. Also note, I updated my answer because I misspoke. – Brenden Kehren May 19 '16 at 12:21
  • Well, but thats the whole point. You rushed into writing an answer which was clearly wrong and thats why you got downvoted. Thats the point of votes or not? – Enn May 19 '16 at 15:18
  • I will upvote you next time when the answer is good and to the point as I have before :-) – Enn May 19 '16 at 15:25
  • Internet trolls...your comments show you're simply an internet troll. I don't care about the points or the downvote, simply wanting to provide people with the same help I have been for years. – Brenden Kehren May 20 '16 at 04:35
  • Are you kidding, right? Based on your logic nobody is allowed to downvote you even if the answer is wrong? I gave you exact reason as to why. Everyone reading this knows Im not a troll as you do to.. – Enn May 20 '16 at 05:38
0

I am not sure what do you mean by content translation in page type fields - there is support for translating page type fields. You can find example on sample site in Kentico installation. (The site is called DancingGoat - see image example for page type field localization in english and spanish language).

enter image description here

Martin Makarsky
  • 2,580
  • 1
  • 17
  • 28