How to protect Joomla article TITLES from being translated?

Popular automatic website translation tool

How to protect Joomla article TITLES from being translated?

Postby [email protected] » Wed Feb 02, 2011 4:11 pm

Q: Can I exclude some parts from being translated?
A: Yes, you need to wrap the text you don't want to be translated with <span class="notranslate"></span>.


Hi!
I'm using module Gtranslate on some of my sites and it's really a nice and easy way to add translation :D .

For article content it works fine with <span class="notranslate">text</span> but how to protect Joomla article titles from being translated? It doesn't matter what code you write in the title field, everything is "stripped" after saving the article. If I try it in article content like <H1> and <H2> it's not working either.

I'd be really grateful if someone can help me with this :(

/Catarina
[email protected]
 
Posts: 2
Joined: Wed Feb 02, 2011 3:58 pm

Re: How to protect Joomla article TITLES from being translat

Postby Edvard » Tue Feb 08, 2011 12:38 am

You can add class="notranslate" attribute to your heading tags. Ex.
Code: Select all
<h1 class="notranslate">Title</h1>
Regards,

Edvard Ananyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Edvard
Site Admin
 
Posts: 4186
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: How to protect Joomla article TITLES from being translat

Postby [email protected] » Tue Feb 08, 2011 1:53 pm

Hi and thank you for your response.

I solved the problem with the article title (the one you write in a form field) by changing "Show article title" to "No" and then use a headline (the same text as in the title) in the beginning of the article with <h1 class="notranslate">.

But how to protect for example names and other contact info from the Contact component fields, you can write code in the fields but after saving it's all gone :( .
[email protected]
 
Posts: 2
Joined: Wed Feb 02, 2011 3:58 pm

Re: How to protect Joomla article TITLES from being translat

Postby Edvard » Tue Feb 08, 2011 2:09 pm

The best you can do is to add overrides in your template, so the output of the contact form will include notranslate classes for the tags you don't want to be translated. Please read how to make joomla overrides here: http://docs.joomla.org/Category:Overrides
Regards,

Edvard Ananyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Edvard
Site Admin
 
Posts: 4186
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia


  • Related Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests

2GLux