Skip to content

Instantly share code, notes, and snippets.

@bdunogier
Last active December 16, 2016 14:54
Show Gist options
  • Save bdunogier/ebb7cd72cbc89337fffb11cf5e609f4d to your computer and use it in GitHub Desktop.
Save bdunogier/ebb7cd72cbc89337fffb11cf5e609f4d to your computer and use it in GitHub Desktop.
Translating eZ Platform in-context using Crowdin.com

Crowdin In-Context integration

This guide explains how to translate the eZ Platform UI in-context, within the application itself. It uses crowdin.com, and requires eZ Platform 1.7.0, released on december 15th.

  • Edit vendor/willdurand/js-translation-bundle/Bazinga/Bundle/JsTranslationBundle/Controller/Controller.php:198, change {2} to {3}.

  • Download the ezplatform-ach-ug-translations-tgz file from this gist.

  • Unzip it from app/Resources/translations. Create the directory if it doesn't exist. You should have three new directories: EzPublishCoreBundle, EzSystemsPlatformUIBundle and EzSystemsRepositoryFormsBundle.

  • Edit vendor/ezsystems/platform-ui-bundle/Resources/views/PlatformUI/shell.html.twig, and add this block right before the closing </head> tag:

    <script type="text/javascript">
        var _jipt = [];
        _jipt.push(['project', 'ez-platform']);
    </script>
    <script type="text/javascript" src="//cdn.crowdin.com/jipt/jipt.js"></script>
  • Set your browser's locale to ach-UG. One way is to add this locale to your preferences. Another one is to install a browser plugin such as Quick Language Switcher.

  • Clear caches, and refresh the eZ Platform homepage. Crowdin should load on top of Platform, asking you to login to start translating.

@mere-teresa
Copy link

There is a typo:

change {2} to {3}

change {2} to {2,3}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment