#1 2016-02-22 15:21:56

Registered: 2016-02-22
Posts: 1

Multi language medias?

Hi I am new to ionize cms. It's so useful for me but I can not find any language limitations about media. My problem is slider with multi language site. Content have to change with language. My solution is creating new menu and add content on it but I do not think it is a good way to do. So what is the best solution for this? Thanks for any help.


#2 2016-03-08 15:21:20

Registered: 2014-03-07
Posts: 183

Re: Multi language medias?


Media is specific to an article, you cannot attach different media by languages, you have several options:

1.Make the images inline, use the "insert/ edit embed media" button, this way you can use any image you like for each language.  However this only work for the actual article.

2. Use some logic and check the language

<ion:language:code />

then use a condition to display the media, for instance if language equal to France show media range 4 to 8

3. Use the language as a prefix so if it not your default language, then check the sub folder

  <ion:media:type is="picture">
       <img src="<ion:language:code /><ion:media:src" />


#3 2016-03-23 17:23:07

Ionize Friend
From: Germany
Registered: 2010-09-20
Posts: 397

Re: Multi language medias?


The <ion:media:src /> is absolute URL, you can use the <ion:base_path /> and <ion:file_name/> to generate the whole url, but if you do that then the automatic image resizer will be ignored.

I think if you add a select or checkbox to the medias with language codes then you can manage which media should be rendered with the single php if expression:

<ion:medias type="picture">
<?php if( "<ion:extend:my-field:value />" == "<ion:language:code />" ): ?>
    <img src="<ion:media:src />" alt="<ion:media:alt />" />
<?php endif; ?>

Best Regards,

Webdeveloper, Programmer, Application developer, Ionize friend


What's Ionize ?

Ionize is an Open Source Content Management System created by webdesigners for webdesigners.

Created and maintained by Partikule and Toopixel, Ionize wants to be the easiest and most powerful CMS.

Can I help ?

Because talent is nothing without involvement, we are looking for motivated coders and webdesigners to join the project team.


Website : ionizecms.com
Documentation : doc.ionizecms.com

Development : Ionize on GitHub
Translations : Ionize Translations