<commit_before><?php
/**
 * Part of the ETD Framework Utility Package
 *
 * @copyright   Copyright (C) 2015 ETD Solutions, SARL Etudoo. Tous droits réservés.
 * @license     Apache License 2.0; see LICENSE
 * @author      ETD Solutions http://etd-solutions.com
 */

namespace EtdSolutions\Utility;

use EtdSolutions\Language\LanguageFactory;
use Joomla\Language\Language;

class LocaleUtility {

    /**
     * @var Language L'objet langue.
     */
    private $lang;

    function __construct() {

        $this->lang = (new LanguageFactory)->getLanguage();

    }

    public function money_format($number, $format = '%!i') {

        setlocale(LC_MONETARY, $this->lang->getLocale());
        return money_format($format, $number);

    }

    public function localeconv() {

        setlocale(LC_ALL, $this->lang->getLocale());
        return localeconv();

    }

}<commit_msg>Modif pour afficher le signe euro<commit_after><?php
/**
 * Part of the ETD Framework Utility Package
 *
 * @copyright   Copyright (C) 2015 ETD Solutions, SARL Etudoo. Tous droits réservés.
 * @license     Apache License 2.0; see LICENSE
 * @author      ETD Solutions http://etd-solutions.com
 */

namespace EtdSolutions\Utility;

use EtdSolutions\Language\LanguageFactory;
use Joomla\Language\Language;

class LocaleUtility {

    /**
     * @var Language L'objet langue.
     */
    private $lang;

    function __construct() {

        $this->lang = (new LanguageFactory)->getLanguage();

    }

    public function money_format($number, $format = '%!i') {

        setlocale(LC_MONETARY, $this->lang->getLocale());
        $str = money_format($format, $number);
        $str = str_replace('Eu', '€', $str);
        return $str;

    }

    public function localeconv() {

        setlocale(LC_ALL, $this->lang->getLocale());
        return localeconv();

    }

}
{'fraction_non_alphanumeric': 0.1314935064935065, 'fraction_numerical': 0.006493506493506494, 'mean_word_length': 2.9340425531914893, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3999254', 'n_tokens_mistral': 596, 'n_tokens_neox': 565, 'n_words': 141}