Fetching a Localized Global as a Static Translation Causes Error in How Plugins Load
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;
}