Sitecore Connector

Sitecore Connector Installation and Configuration

Installing Sitecore Connector Module

  1. Create a new database, and at the SQL Server, execute the script Sitecore_Data.sql (can be found in the %website root%/sitecore modules/Shell/Smartling.Connector folder).

    Don’t forget to update first line of the script (USE [%your database name%]).

  2. Add new connection string to /Website/App_Config/ConnectionStrings.config, name should be SitecoreLocalization, here’s the example:

    XML
    <add name="SitecoreLocalization" connectionString="user id=sa;password=Password12345;Data Source=.\SQLEXPRESS;Database=SitecoreLocalization_Data"/>

  3. Go to the Sitecore Desktop, open Installation Wizard, and upload and then install the Smartling.Connector.ver.[version].zip package.
    install_package.png

  4. Find and edit the configuration file. Your access should allow you to save the file.
    • For Sitecore 8.1 and above - App_Config\Sitecore.config
    • For Sitecore 8.0 and below - Web.config

  5. Locate the </log4net> tag and insert the following snippet above the tag.

    log4net xml snippet
    <appender name="SmartlingLogFileAppender" type="log4net.Appender.SitecoreLogFileAppender, Sitecore.Logging">
       <file value="$(dataFolder)/logs/SitecoreLocalization.log.{date}.txt" />
       <appendToFile value="true" />
       <layout type="log4net.Layout.PatternLayout">
    <conversionPattern value="%4t %d{ABSOLUTE} %-5p %m%n" />
    </layout>
       <encoding value="utf-8" />
    </appender>
    <logger name="Smartling.Connector.Diagnostics.SmartlingLogger" additivity="false">
       <level value="DEBUG" />
       <appender-ref ref="SmartlingLogFileAppender" />
    </logger>


    As a result, you should have something that looks like this:
    log4net.png

Configuring Sitecore Connector Module

Modify the following settings to configure Sitecore for use with Smartling.

Profiles

Under the main settings item, Profiles contains one or more profiles that you can use for different content tree nodes, controlled by the Source Path setting.

select_items.jpg

Each profile should also contain one or more locales (target languages), that you can add using insert options.

add_using_insert_options.jpg

Target Path and Smartling Locale fields are optional and can be left empty. Smartling Locale field allows you to override the Sitecore languages code when sent to Smartling.

Retrieval Type

You can also specify how Smartling retrieves and displays the content.

retrieval_type.jpg

In the Retrieval Type box, type one of the following options:

Option Description 
published  Only translations in the Completed step will be retrieved. 
pseudo  Pseudo translations, which are the original strings with extra characters added to increase the length by 30 percent (default), will be retrieved. Pseudo translation emulates the increase in length that can occur when strings are translated, allowing you to test the expanded text before translation is completed.
pending Translations in Completed and other workflow steps (e.g., Editing, Review) will be retrieved. 

 

Callback Domain

In the Callback Domain field, ensure that you specify a valid URL. It must be accessible from the Internet, for example:

sitecore.png

Translatable Fields

Translatable Fields contains commons field types.
If you will translate Dictionary then you should add the memo field type to this list.

Target Workflow States

The connector can be configured to use Sitecore Workflow. Namely, it can push an item to a particular Sitecore workflow state when translations are applied. In order to do this, you should configure which target workflow state should be used. (Do this for each workflow). The connector will choose an appropriate workflow state according to the workflow configured in a target item.

If the target item doesn't use any workflow, then the connector will not update the workflow state.

select_items.png


Target Languages

Use Target Languages to specify the languages to which you want to translate your content.

smartling_locale.jpg

Configure Translations on Field Level

Consult this article to see how the Sitecore connector handles field values when new translations are applied from Smartling.


Auto-Authorize

Check the Auto Authorize Content box to automatically Authorize your content into the default workflow for each language in the Smartling Dashboard, rather than sending it to your Awaiting Authorization queue.

Test Connection

Browse to module settings (/sitecore/system/Modules/Smartling Connector) and verify your connection by clicking Test Connection.

test_connection.jpg

Installing Sitecore Remote Connector 

Go to Sitecore Desktop, and install Smartling.Connector.Remove.ver.[version].zip package.

Configuring Sitecore Remote Connector

  1. Open Sitecore Content Editor and browse to /sitecore/system/Modules/Smartling Connector/Context. It contains the following settings:
    • Server Url: The remote module uses this URL for requesting HTML and resources such as CSS\JS\Img. In general, it should contain the domain of your site. Please don’t use localhost as the Server Url. If you test the connector on a local environment, then register the name in a hosts file and use it in the browser.
    • Impersonated User: User account that used for getting HTML. If you didn’t provide an user account, then Sitecore uses anonymous access.
    • Enabled: You can enable/disable context for translation.
      context.jpg
  2. Browse to each of your settings profiles (items under /sitecore/system/Modules/Smartling Connector/Profiles).
  3. Click Connect, and the remote module will use the Api Key + User Identifier for connecting to the Smartling context Service.
    default_site.jpg

Installing Extended Support for the General Link Field

This package allows you to translate the Description property of General Link. By default, the connector doesn't send it for translation.

sitecore_items.png

  1. Go to the Sitecore desktop.
  2. Install the Smartling.Connector.LinkFieldTranslator.ver.[version].zip package.
    install_a_package.png

Configuring Translation of General Link

In general, the LinkFieldTranslator package doesn’t require additional configuration. However, don't forget to add the General Link field type to the list of Translatable Fields.

select_items2.png


Configuring Translation on Field Level

Coming soon....

Uninstalling Sitecore Connector Module

  1. Remove the following sections from Web.config if you have Sitecore 8.0 and below, or App_Config/Sitecore.config for Sitecore 8.1 and above

    XML
    <appender name="SmartlingLogFileAppender" type="log4net.Appender.SitecoreLogFileAppender, Sitecore.Logging">
       <file value="$(dataFolder)/logs/SitecoreLocalization.log.{date}.txt" />
       <appendToFile value="true" />
       <layout type="log4net.Layout.PatternLayout">
    <conversionPattern value="%4t %d{ABSOLUTE} %-5p %m%n" />
       </layout>
    </appender>
    <logger name="Smartling.Connector.Diagnostics.SmartlingLogger" additivity="false">
       <level value="DEBUG" />
       <appender-ref ref="SmartlingLogFileAppender" />
    </logger>


  2. Remove SitecoreLocalization _connection string from /Website/AppConfig/ConnectionStrings.config.
  3. Remove the module configuration file: /Website/App_Config/Include/SitecoreLocalization.config.
  4. Remove the /Website/sitecore modules/Shell/SitecoreLocalization folder.
  5. Remove items (and subitems) at the following locations:

Master Database

XML
\sitecore\system\Modules\Smartling Connector
\sitecore\system\Settings\Validation Rules\Field Rules\System\SitecoreLocalization Api Key
\sitecore\system\Settings\Validation Rules\Field Rules\System\SitecoreLocalization Api Url
\sitecore\system\Settings\Validation Rules\Field Rules\System\SitecoreLocalization Project Id
\sitecore\templates\User Defined\SitecoreLocalization

Core Database

XML
\sitecore\content\Applications\Translation Status
\sitecore\content\Applications\Content Editor\Ribbons\Chunks\Translate\Translate
\sitecore\content\Applications\Content Editor\Ribbons\Chunks\Translate\Translate\Run Agents
\sitecore\content\Applications\Content Editor\Ribbons\Contextual Ribbons\SitecoreLocalization Settings
\sitecore\content\Documents and settings\All users\Start menu\Left\Smartling Translate.item
\sitecore\content\Documents and settings\All users\Start menu\Left\Smartling Status

Was this article helpful?