Fetching a Localized Global as a Static Translation Causes Error in How Plugins Load I've extended all my "translations/[locale_id].php" to refer to this  function which enables us to put all our translations under a global in the control-panel.

However, when this is done – we lose data attached to our assets. We currently use a Focal Point plugin attached to our assets. It describes with a field how images are to be cropped. This particular plugin stops working when the line highlighted below is executed.

function get_dynamic_translations() {
    $translations = array();

    if (!craft()-&gt;request-&gt;isCpRequest()) {
        // the following line makes the plugin "FocalPointField" stop loading its data
        $i18n = craft()-&gt;globals-&gt;getSetByHandle('i18n');

        foreach ($i18n-&gt;getFieldValue('translations') as $current_block) {
            $translations[$current_block-&gt;content-&gt;key] = $current_block-&gt;content-&gt;value;
        }
    }

    return $translations;


}


I would love for these two solutions to work together in perfect harmony – but I can't seem to figure out why this is not working. 

Do you have any idea how I can go forth?
This line:



$current_criteria-&gt;fieldId = craft()-&gt;fields-&gt;getFieldByHandle('translations');


should probably have a -&gt;id at the end?

$current_criteria-&gt;fieldId = craft()-&gt;fields-&gt;getFieldByHandle('translations')-&gt;id;


But the whole code could probably be replaced with:

function get_dynamic_translations() {
    $translations = array();

    if (!craft()-&gt;request-&gt;isCpRequest()) {

        $i18n = craft()-&gt;globals-&gt;getSetByHandle('i18n');

        foreach ($i18n-&gt;getFieldValue('translations') as $current_block) {
            $translations[$current_block-&gt;content-&gt;key] = $current_block-&gt;content-&gt;value;
        }
    }

    return $translations;
}