FOF30\Platform\Joomla\Platform::loadTranslations PHP Method

loadTranslations() public method

Load the translation files for a given component.
See also: PlatformInterface::loadTranslations()
public loadTranslations ( string $component ) : void
$component string The name of the component. For Joomla! this is something like "com_example"
return void
    public function loadTranslations($component)
    {
        if ($this->isBackend()) {
            $paths = array(JPATH_ROOT, JPATH_ADMINISTRATOR);
        } else {
            $paths = array(JPATH_ADMINISTRATOR, JPATH_ROOT);
        }
        $jlang = $this->getLanguage();
        $jlang->load($component, $paths[0], 'en-GB', true);
        $jlang->load($component, $paths[0], null, true);
        $jlang->load($component, $paths[1], 'en-GB', true);
        $jlang->load($component, $paths[1], null, true);
    }