protected static function createName(\SimpleXMLElement $currency)
    {
        $locale = self::getLocale();
        //first - see if we have an exact locale match
        $nodes = $currency->xpath("name[@lang='{$locale}']");
        if (count($nodes) > 0) {
            return (string) $nodes[0];
        }

        //next, see if we have a name for the language part of the locale
        $lang = \locale_get_primary_language($locale());
        $nodes = $currency->xpath("name[@lang='{$lang}']");
        if (count($nodes) > 0) {
            return (string) $nodes[0];
        }

        //else default to using 'en'
        $nodes = $currency->xpath("name[@lang='en']");
        return (string) $nodes[0];
    }