balazs-endresz / jquery-translate

Automatically exported from code.google.com/p/jquery-translate
5 stars 5 forks source link

Option to exclude some parts from being translated #23

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Is it possible to add a exclude parameter to exclude some parts from being 
translated?

$('body').translate('ru', {exclude: 'div#non-translate'})

Thanks for the excellent library!

Original issue reported on code.google.com by edo...@gmail.com on 15 Dec 2009 at 2:19

GoogleCodeExporter commented 9 years ago
Yes, only the option name is `not` (just like in jquery). However in some cases 
the
text to be translated contains DOM elements to preserve the sentences and 
context
(e.g. anchor, strong, etc. tags). In these cases you can add a ´notranslate´ 
class:
http://googlewebmastercentral.blogspot.com/2008/10/helping-you-break-language-ba
rrier.html

Or alternatively you can try this:
http://code.google.com/p/jquery-translate/wiki/TextnodeTranslatorIntegration

Original comment by balazs.endresz on 15 Dec 2009 at 3:33

GoogleCodeExporter commented 9 years ago

Original comment by balazs.endresz on 2 Jan 2010 at 11:20