Language support for Media

Having Problems? Need Help? Post here!

Language support for Media

Postby Dukessa » Mon Dec 03, 2012 6:19 pm

I was wondering if there is a "quick" way to add language support for Media, to add different description, name etc... for images/stuff uploaded in the Media Library.

Anyone?
Dukessa
 
Posts: 16
Joined: Wed Aug 26, 2009 12:59 pm

Re: Language support for Media

Postby jaddle » Mon Dec 03, 2012 10:20 pm

Just use tags in the caption/description:
Code: Select all
<!--en:-->Here's some English text<!--:-->This will show up in both languages <!--:fr-->Et voici du texte français<!--:-->


You can use these tags *almost* everywhere (a few spots won't work, and some functions will print the raw data instead of filtering it through qtranslate, though you can work around that by editing your theme ususally).
jaddle
 
Posts: 38
Joined: Tue Aug 02, 2011 8:23 pm

Re: Language support for Media

Postby Dukessa » Mon Dec 03, 2012 10:48 pm

Thanks Ill try that.
Already tried [:en] and it messed up the code.
Wouldnt it just be easier to add support for pretty much any content-related field right in the plugin?
Dukessa
 
Posts: 16
Joined: Wed Aug 26, 2009 12:59 pm

Re: Language support for Media

Postby jaddle » Mon Dec 03, 2012 11:43 pm

Not really - for one thing, the plugin doesn't know what fields other plugins and themes might add. Another thing is that the tags are actually more flexible than having separate text boxes for each language - for pages with images and complicated formatting, for example, you can put all the layout in once, and then just have the tags surrounding different versions of the text. I do this with all the multilingual web pages I manage.

Here's an example:
Code: Select all
<h3>
<!--:en-->The title<!--:-->
<!--:fr-->Le titre<!--:-->
</h3>

<img src="headerimage.jpg" />

<!--:en--><p>Here's the body of the article.</p><!--:-->
<!--:fr--><p>Voici le texte</p><!--:-->

<div class="footer"> <img src="footerimg.jpg"/></div>


So if I change the headerimage to a png in that example, I just go and change jpg to png ONCE, without having to adjust it for each language. It's a really nice and flexible system, though you do have to be a little more comfortable looking at the html code.
jaddle
 
Posts: 38
Joined: Tue Aug 02, 2011 8:23 pm

Re: Language support for Media

Postby Dukessa » Tue Dec 04, 2012 10:12 pm

jaddle wrote:Not really - for one thing, the plugin doesn't know what fields other plugins and themes might add. Another thing is that the tags are actually more flexible than having separate text boxes for each language - for pages with images and complicated formatting, for example, you can put all the layout in once, and then just have the tags surrounding different versions of the text. I do this with all the multilingual web pages I manage.
So if I change the headerimage to a png in that example, I just go and change jpg to png ONCE, without having to adjust it for each language. It's a really nice and flexible system, though you do have to be a little more comfortable looking at the html code.


Thats clearly not what I meant. I already use php and tags in the template code.
The problem is for people who dont know the code and all they can edit is their posts and media library.
And thats where the plugin could integrate lang fields, just like it does for post title, content and excerpt, and categories.

And I did try to use the tags in the POST image fields, and it messed up the single article code.
Dukessa
 
Posts: 16
Joined: Wed Aug 26, 2009 12:59 pm

Re: Language support for Media

Postby jaddle » Wed Dec 05, 2012 1:41 am

Of course, I agree with you that it'd be great if it could have separate text boxes for each language for every single possible field, and the media fields could certainly be supported without too much trouble (maybe a future version will have that?) But there's still the problem of plugins and themes that introduce new text fields - there's no way for this plugin to support that, unfortunately, since of course, it doesn't know what text fields will be created, let alone if it would be appropriate to translate them.

What do you mean by "messed up the single article code"? With a few details, maybe I can help you get that problem fixed.
jaddle
 
Posts: 38
Joined: Tue Aug 02, 2011 8:23 pm

Re: Language support for Media

Postby broken580 » Wed Dec 05, 2012 11:47 am

English and Dutch) in my wordpress site with qtranslate. I also have the default buddypress page for the "Activity", but when I switch between "All Members" and "My Groups" for example, the text of the Activity page resets to default (English).
marlon brando mcqueen motorcycle jacket marlon brando mcqueen motorcycle jacket
leather corsets plus size leather corsets plus size
big and tall leather jacket big and tall leather jacket
broken580
 
Posts: 1
Joined: Wed Dec 05, 2012 11:46 am

Re: Language support for Media

Postby jaddle » Wed Dec 05, 2012 6:14 pm

Broken580, I think your comment got messed up - maybe it was intended for another thread or something? It seems that we only got part of it, in any case. Try making a new post.
jaddle
 
Posts: 38
Joined: Tue Aug 02, 2011 8:23 pm


Return to qTranslate Support Forum

Who is online

Users browsing this forum: Google [Bot], Google Adsense [Bot] and 11 guests