src/ShopTools.php
public static function install_locale($locale)
    {
        // If the locale isn't given, silently fail (there might be carts that still have locale set to null)
        if (empty($locale)) {
            return;
        }

        if (class_exists('TractorCow\Fluent\State\FluentState')) {
            singleton('TractorCow\Fluent\State\FluentState')->setLocale($locale);
        }

        // Do something like Fluent does to install the locale
        i18n::set_locale($locale);

        // LC_NUMERIC causes SQL errors for some locales (comma as decimal indicator) so skip
        foreach ([LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_TIME] as $category) {
            setlocale($category, "{$locale}.UTF-8", $locale);
        }
    }
public static function install_locale($locale)
    {
        // If the locale isn't given, silently fail (there might be carts that still have locale set to null)
        if (empty($locale)) {
            return;
        }

        if (class_exists('TractorCow\Fluent\State\FluentState')) {
            singleton('TractorCow\Fluent\State\FluentState')->setLocale($locale);
        }

        // Do something like Fluent does to install the locale
        i18n::set_locale($locale);

        // LC_NUMERIC causes SQL errors for some locales (comma as decimal indicator) so skip
        foreach ([LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_TIME] as $category) {
            setlocale($category, "{$locale}.UTF-8", $locale);
        }
    }
Set/Install the given locale.
This does set the i18n locale as well as the Fluent locale (if this module is installed)

@param string $locale the locale to install