New features Please use http://kentico.uservoice.com as the primary place to submit your suggestions and allow others to vote for your ideas!
Version 4.x > New features > Quick Copy Documents (images/file) from one language to another View modes: 
User avatar
Member
Member
srizzetto-microgate - 6/18/2009 3:34:22 AM
   
Quick Copy Documents (images/file) from one language to another
I manage a site who has 6 languages; when I upload a series of photo to do a photogallery, I have then to create foreach language the copy of the document.

It is very annoying to make for each document click, copy from, save…

Can it be done via code with the API ? Is there an example ?
I found this one, but it seems it is for creation of brand new documents, not for "links" to existing files.

Thank you
Sandro


User avatar
Kentico Support
Kentico Support
kentico_jurajo - 6/24/2009 6:34:55 AM
   
RE:Quick Copy Documents (images/file) from one language to another
Hi,

In the Site Manager -> Settings -> select your site from the drop down -> Web site -> Combine Files with default culture and check this box (set it to true).

This means, that if the requested file is not available in current culture, the file from the default culture is used. So, you need to upload the images always to the site default culture which is set for the particular site. I hope it will help.

Best Regards,
Juraj Ondrus

User avatar
Member
Member
srizzetto-microgate - 6/24/2009 7:11:50 AM
   
RE:Quick Copy Documents (images/file) from one language to another
UNfortunately this let come out pages that should not exists in some languages... I understand this setting doesn't distinguish between documents/pages and file (images, etc)

So my request for this new "quick batch copy" remain :-)

However thank you for your suggestion

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 6/24/2009 10:53:33 AM
   
RE:Quick Copy Documents (images/file) from one language to another
Hi,
In the settings area you can see that there are two check boxes - one is for documents/pages and second one for files. They have different function.
The meaning of them is that you have the file in culture A but not in culture B. Now the user is browsing the site in culture B and wants to view the image. But this user will get 404 error because the file does not exists in the culture B.
If you will check this setting, the file from the default culture A is used and displayed, so there is no 404 error.

However, if you want to create some script to copy the file documents (CMS.File type), you can use our API and copy the file document from one culture to another. For more details please see this example.

Best Regards,
Juraj Ondrus

User avatar
Member
Member
srizzetto-microgate - 6/26/2009 2:21:07 AM
   
RE:Quick Copy Documents (images/file) from one language to another
Juraj,

thx for the explantion; I had just checked the second one for file and actually if I request directly a File in a language where it not exists I can download/view.

However te photogallery page that let see all the images with a repeater, doesn't show the thumbnail of that file, because obviously it checks for existence of the Document, nor the file... So I am still forced to duplicate N photo for each language

I will try to use the API with your given sample; is there a sample or a prototype of a ConsoleApp or little WinForm app for what References to make and what to put in app.config ?

Thx
Sandro

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 7/3/2009 1:37:16 AM
   
RE:Quick Copy Documents (images/file) from one language to another
Hi,

I have created multilingual site, the image documents are only in the default culture version. In the other versions the documents were not created - there is a black cross by the document name in other languages. I have checked that the documents and files have to be combined with default culture.

Now, I have placed a repeater web part on soma page, set the path to the images and transformations. Everything is working fine and the images and thumbnails are displayed fine for all culture versions. The same is for the image galleries.

Could you please describe me in details all your settings and the repeater configuration?

Best Regards,
Juraj Ondrus

User avatar
Member
Member
srizzetto-microgate - 7/3/2009 1:53:09 AM
   
RE:Quick Copy Documents (images/file) from one language to another
>I have checked that the documents and files have to be combined with default culture.

Hi Juraj,

in this configuration I know it works, but as I told, I can't check the "document combined culture" but only the file, because some part of the portal don't exixts in all the languages.

However thanks a lot for you time spending test !

Sandro

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 7/9/2009 9:34:02 AM
   
RE:Quick Copy Documents (images/file) from one language to another
Hi Sandro,


Could you please try to go to gallery web part Properties and change the following settings?

Combine with default culture: Yes


Is it working?

Best regards,
Helena Grulichova