Categories

.externalcontentGadgetTranslation()

Categories: UI

.externalcontentGadgetTranslation( [ options ] )

Subclass: de_epages

Inherit: (Subclass: de_epages) .widget()

Plugin: de_epages.externalcontent.gadget.translation

Description: Inserts translation widgets.

  • .externalcontentGadgetTranslation( [ options ] )

    version added: 6.15.0

    options   A map of additional options to pass to the method.

Inserts a Google-translation-Widget or a Microsoft-translation-Widget into the target element on which this widget is executed on.

  • The Widget is executed on a page element and is called with passing optional parameters. With passing 'microsoft' as service parameter the translator Widget of Microsoft is appendet to the target page element.

    Code:
    
    
    <script>
    		jQuery.ready({
    				plugin: [ 'e_epages.externalcontent.gadget.translate' ],   
    				DOM:    true                             			  
    			}, function($){
    				var widget = de_epages('<div>').externalcontentGadgetTranslate({
    					service : 'microsoft'
    				});
    		});
    </script>
    
  • The Widget is executed on a page element and is called with passing optional parameters. With passing 'google' as service parameter the translator Widget of Google is appendet to the target page element.

    Code:
    
    
    <script>
    		jQuery.ready({
    				plugin: [ 'e_epages.externalcontent.gadget.translate' ],   
    				DOM:    true                             			  
    			}, function($){
    				var widget = de_epages('<div>').externalcontentGadgetTranslate({
    					service : 'google'
    				});
    		});
    </script>
    
    
    
  • services

    version added: 6.15.0

    defines which of the available translator Widgets gets appended

    Default: epConfig.canonicalUrl

  • destroy

    • .externatcontentGadgetTranslation('destroy')

      version added: 6.15.0

    This method removes the container on which the Google-Plus button has been appended to.