EE Auto-Translate

Developer

JCOGS Design

3rd Party (Commercial)
Current Version: 1.0.6
Minimum EE Version: 5.0
Release Date: Oct 8, 2021

License Agreement

Buy Now!

$25.00
Qty:

EE Version Support

  • ExpressionEngine 5
  • ExpressionEngine 6

Compatibility

If an item is crossed out, it might be untested, not applicable or incompatible. Contact the developer to be sure.

  • Updater
  • Multi Site Manager
  • Stand Alone Entry Form
  • Low Variables
  • Content Elements
  • Better Workflow
  • Matrix
  • Grid
  • Webservice
  • Publisher

Requirements

  • jQuery for the Control Panel

Add-On Type(s)

Module

Tags

Use online machine translation services on your site.

Multiple vendors now provide machine translations via API services - including Google and DeepL.

EE-AutoTranslate provides a simple tag-based method for accessing such translation services via:

  • a unified control panel to store api keys, account status information and access to add-on documentation;
  • if a service allows for it, an option to determine whether <html> tags are included in the translation;
  • an option to allow translated text to be cached;
  • an option to add useful debug information to the EE template profile log;
  • [in version 2] provide a mechanism to fail-over between enabled service providers (e.g. when ‘free’ translation limits are reached on a provider, or a source / target language not supported by chosen service).

N.B. Currently EE-AutoTranslate V1 supports only the DeepL machine translation service.  Future versions will add support for similar services from other providers, for example Google and Microsoft.

Installation

Copy the jcogs_mts folder to your system/user/addons folder and then install from the ExpressionEngine Control Panel Add-ons page.


Configuration

Configuration of the add-on is required before it can be used.

Configuration is controlled using the add-on settings page which can be accessed from the ExpressionEngine Control Panel Add-ons page.

API keys

Machine translation services require an API key to authorise the translation transactions.
EE Auto-Translate will not work without at least one valid API key being added to the settings page. [DeepL}(https://www.deepl.com/pro-checkout/account?productId=1200&yearly=false&trial=false) (and other providers) provide a limited amount of ‘free’ usage of their service (typically 500,000 characters / month) which is useful at the very least for testing purposes.

Enable translation?

This slider controls whether a machine translation service is to be used. If a service is disabled in this settings panel, any EE Auto-Translate tags that are configured to use the service will have no function regardless of any parameters they may contain.  Upon processing the EE Auto-Translate tags will simply return the specified text unchanged to the template.

Ignore XML tags by default?

Some machine translation services provide the option to exclude <XML> tags from the translation being carried out - which in practice allows for <html> mark-up to be ignored; the text returned from a translation run retains whatever <html> tags it included unchanged.

This setting determines the default option for {exp:jcogs_mts:translate} 
and  {exp:jcogs_mts:translate_all} tags.

Regardless of the default setting <html> processing can be determined on a per-tag basis by adding the xml= parameter to a tag.

Caching: Default time period (s) to keep a cached copy of translations

Machine Translation Services charge per character translated. To minimise use EE Auto-Translate attempts to cache all translation results.  This configuration setting allows you to specify the default period that a translation will be kept alive in the cache.  Setting this value to 0 will effectively disable caching by default.

The default cache value can always be overridden within a tag by use of the cache= parameter.

Caching is carried out using the EE Caching Service: if the EE Cache Manager is used to clear All Caches the translation cache will also be cleared.

Debugging: Enable debug messages?

If this option is enabled then EE Auto-Translate will write additional messages to the Templates tab within the EE Page Debug report.


Usage

Translations are created by adding one or more {exp:jcogs_mts:translate} or {exp:jcogs_mts:translate_all} tags to your document.

Single tag

The text to be translated is included as the variable text= within a single {exp:jcogs_mts:translate} tag.

The tag must contain a to= parameter to specify the required target language for the translation using the appropriate two-letter ISO 639-1 country code.

Additional parameters can be added to the tag to let you over-ride any default parameter values.

On processing the tag is replaced with the translated text.

    {exp:jcogs_mts:translate 
        value="My cat is a black domestic short-hair called 'Killer'." 
        to="DE"
    }
    -> "Meine Katze ist eine schwarze Hauskatze, kurzhaarig, namens 'Killer'."

Tag Pair

The text to be translated is wrapped between an opening / closing pair of {exp:jcogs_mts:translate} tags.

The opening must contain a to= parameter to specify the target language for the tranlsation, along with any optional parameters chosen.

The language to translate to is specified using the appropriate two-letter ISO 639-1 country code. Additional parameters added to the tag let you over-ride any default parameter values.

On processing the text enclosed by the tag-pair is replaced with the translated text.

    {exp:jcogs_mts:translate 
        to="DE"
    }
    My cat is a black domestic short-hair called 'Killer'.
    {/exp:jcogs_mts:translate}
    -> "Meine Katze ist eine schwarze Hauskatze, kurzhaarig, namens 'Killer'."

Translate All Tag

In the special case that you want to translate all of the output of a template, you can add the {exp:jcogs_mts:translate_all} tag to your template.

The tag must contain a to= parameter to specify the required target language for the translation using the appropriate two-letter ISO 639-1 country code.

Additional parameters can be added to the tag to let you over-ride any default parameter values.

On processing all of the text within template being parsed is replaced by translated text (see notes 1, 2 and 3).

    {exp:ee-mts:translate_all 
        to="DE"
    }
    My cat is a black domestic short-hair called 'Killer'.
    -> "Meine Katze ist eine schwarze Hauskatze, kurzhaarig, namens 'Killer'."

Notes

Note 1

If you put a translate_all tag into a template, any and all translate tags will be ignored: this is to avoid translation of the same text multiple times within the same template parse.

Note 2

Should you put more than one {exp:jcogs_mts:translate_all} tag in a template, the one nearest to the end of the template when parsing occurs (i.e. after expansion of all EE content tags) will be the one used.

Note 3

To avoid complications arising from inadvertent translations of mark-up content, EE Auto-Translate does not attempt to translate any of:

  • The HTML <head> section of a web page
  • The content of any HTML <script> or <style> tags
  • The content of any EE comments within the template
  • The content of any late-parsed EE short-form tags (i.e. path and template variables)

Despite this, due to limitations of the XML processing routines employed by the machine translation services some HTML processing errors might arise from translations, especially when using translate_all tags.  If this happens let JCOGS Design know: fixes to some issues may be possible.

Note 4

Not all languages are available as either target or source languages - the limitations are determined by each machine translation service provider.  If you attempt to translate to or from a language that is not supported by the machine translation service provider you are using, EE Auto-Translate will report an error. To assist you in ensuring that you specify valid languages, the {exp:jcogs_mts:languages} tag is provided - see its support text for details.

 

 

This entry was created October 8, 2021, 12:44 pm.
This entry was last updated October 8, 2021, 6:51 pm.

Disclaimer: Information about ExpressionEngine add-ons is provided as a service to you, the user, and every member of the ExpressionEngine community. devot:ee is not responsible if you hose, mangle, wreck, or otherwise destroy your EE website by installing an add-on that you found out about at this site, regardless of its rating, Favorites status, commercial or free status, or general popularity. Caveat EEmptor!

Returns: devot:ee has a 30-day return policy on all commercial add-ons sold through devot-ee.com. If you need to return an add-on, do not go to the developer or the developer's site, but rather visit our returns page at https://devot-ee.com/returns to initiate your return. If you have questions, email support@devot-ee.com.

There are no reviews for this add-on yet.

What are you waiting for? Rate it and review it!