Localizing Page Attachments

Jim Piller asked on July 22, 2021 18:17

I have a client project that I'm working on, and they have PDF's that are available in several different languages. I'm wondering what the best way is to list these documents out on a page controlled by a language drop down. So, for example, if someone selects Chinese from the drop down, it will filter the list of products and documents to show only the ones that appear in Chinese? Obviously the content editors have to upload all the versions of the PDF's, but I guess my real concern is managing all of this in the content tree. Should I use the media library instead or is there a way to add a language variant to a page type? I've included my content tree structure up to this point for reference.

Image Text

Correct Answer

Sean Wright answered on July 23, 2021 15:35

Jim,

There are lots of ways to handle this both when localizing the content and querying for the content.

If you enable the Combine with default culture setting in CMS -> Settings -> Content -> Multilingual then when you use the IPageRetriever it will return the default culture version if no localized version exists.

This would mean you could localize only the 2 field Page Type Pages, using the default (unlocalized Pages) for the rest of the site.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Sean Wright answered on July 23, 2021 06:13

Page/content localization is a standard feature of Kentico Xperience.

If you have 5-6 language variations for a given PDF, it seems to me like that PDF should be a File field on a custom Page Type and that Page should be localized to your different languages.

You can then query for those pages using the selected culture from your dropdown.

0 votesVote for this answer Mark as a Correct answer

Jim Piller answered on July 23, 2021 14:08

Hey Sean,

Thanks for the suggestion. I think this is what I was thinking, just couldn't quite find the correct documentation link! One more question - Can / should I use the list of site cultures added in my drop down to then find the content I'm looking for?

Thanks,

Jim P.

0 votesVote for this answer Mark as a Correct answer

Sean Wright answered on July 23, 2021 14:12

Jim,

That's a content question. You can use the cultures from the database to generate the options in the <select> or you can generate values some other way and connect those to the cultures associated with the localized Pages in the CMS_Document table. Up to you!

0 votesVote for this answer Mark as a Correct answer

Jim Piller answered on July 23, 2021 14:17

ok, cool. Final question - Do I need to translate just the File field that has the PDF attachment or do I need to translate the entire product page and all associated content? In my image above, the items under "Data Sheets" are a custom page type w/ basically two fields - Title and the File field for the PDF. I would think I would just need to add language variations for just that page type. Is that correct?

0 votesVote for this answer Mark as a Correct answer

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