Skip to main content
added 26 characters in body
Source Link
carlcs
  • 36.3k
  • 5
  • 63
  • 140

This solutions works for any locale, even if you don't have it installed as a front-end locale. It also works for Personal or Client Craft installs.

Add a translations file into craft/translations/xx.php named after the currently selected user locale or system locale for Craft Personal installs and use this code to include any locale's translations you want. You can also customize it further by overwriting select translations:

<?php
namespace Craft;

if (craft()->request->isCpRequest())
{
    $en = (include '../craft/app/translations/enen_us.php');
    $custom = array(
        'Globals' => 'I freak out!',
    );

    return array_merge($en, $custom);
}

return array();

This solutions works for any locale, even if you don't have it installed as a front-end locale. It also works for Personal or Client Craft installs.

Add a translations file into craft/translations/xx.php named after the currently selected user locale or system locale for Craft Personal installs and use this code to include any locale's translations you want. You can also customize it further by overwriting select translations:

<?php
namespace Craft;

if (craft()->request->isCpRequest())
{
    $en = (include '../craft/app/translations/en.php');
    $custom = array(
        'Globals' => 'I freak out!',
    );

    return array_merge($en, $custom);
}

This solutions works for any locale, even if you don't have it installed as a front-end locale. It also works for Personal or Client Craft installs.

Add a translations file into craft/translations/xx.php named after the currently selected user locale or system locale for Craft Personal installs and use this code to include any locale's translations you want. You can also customize it further by overwriting select translations:

<?php
namespace Craft;

if (craft()->request->isCpRequest())
{
    $en = (include '../craft/app/translations/en_us.php');
    $custom = array(
        'Globals' => 'I freak out!',
    );

    return array_merge($en, $custom);
}

return array();
Source Link
carlcs
  • 36.3k
  • 5
  • 63
  • 140

This solutions works for any locale, even if you don't have it installed as a front-end locale. It also works for Personal or Client Craft installs.

Add a translations file into craft/translations/xx.php named after the currently selected user locale or system locale for Craft Personal installs and use this code to include any locale's translations you want. You can also customize it further by overwriting select translations:

<?php
namespace Craft;

if (craft()->request->isCpRequest())
{
    $en = (include '../craft/app/translations/en.php');
    $custom = array(
        'Globals' => 'I freak out!',
    );

    return array_merge($en, $custom);
}