Xili-language: Media and language of title and caption or description

In WP, a media is a file (image, video, pdf, txt,...) currently saved as attachment (children) of a post (parent). It is described by a title, alt text, a caption and a description.

What happen to share, by example, an image between a post in english and a post in french ?

No problem if the insertion is used like here (post content in html mode) :

[caption id="attachment_248" align="alignnone" width="1024"]<a href="http://michel.scriban.eu/m/wp-content/uploads/2012/07/DSC01155.jpg"><img src="http://michel.scriban.eu/m/wp-content/uploads/2012/07/DSC01155-1024x727.jpg" alt="Escargot" title="Escargot" width="1024" height="727" class="size-large wp-image-248" /></a> Escargot - α Nex 7 Sony[/caption]
Objectif Sony 18-55mm de base - Plein soleil sur plateau blanc (<em>Le mollusque a été relâché</em>) © MSC 2012

It is easy to copy this caption short code from one post to the other and to change the texts according each language.

Contents

Example with gallery

But if you want to use a gallery, it will be more difficult and uneasy with files uploaded 2 (or more times). The next future version of xili-language (v. 2.7) brings solution as visible here: example with jetpack carousel based on gallery

Admin side: Upload (Media Library) list

Media-library.png

In the Media Library (1), by default, no language is assigned to a media (2). The first media (image) in the list (3) is assigned to french (fr_FR). In the colored rectangle (4), two medias, one in french and on in english share the same file but have good title, caption and description.

Media edit form

New fields at end

Media-edit.png

Above, this image edited form needs to be completed (title here = Insects) and, at end, a language selected.

Cloning action

Cloning-media.png

Because this image is assigned to a language (here french). It is possible now to create a clone (1) in a target language. Remember the file is not copied, only a new attachment is created and ready to be translated by you or another author. The two (or more) attachments are "linked" as you can see in the 'language column' of the Media Library.

Now below, the media (jpg flower) is 'translated' cloned in fr_FR (1):

Cloned-media.png

(In database, one row in post table for each translation, but only one shared attached file).

How to proceed to prepare a gallery ?

(under completion, be patient)


F.A.Q

What happen if a media record is deleted ?

Until one another language exists and is based on the same file, this file is not deleted, only the media record (row in db) is deleted.

What happen if a media is not the same for a post in french and a post in another language ?

You proceed as currently in a mono language website, you attach each file to each post. (Eiffel tower for Paris and London tower for London post !)