Google Translate

echo \Windwalker\Helper\LanguageHelper::translate('飛', 'zh-tw', 'en');

// Result is: fly

We can set the 4th params (eg: 500) to separate long text (Google translate API has some limit on text length).

Load Language Files of any Component

\Windwalker\Helper\LanguageHelper::loadLanguage('com_content', 'site' or 'admin');

This code will include all language files of content component.

Found a typo? Help us improve this document.

This document is for Windwalker Joomla RAD, if you are finding Windwalker PHP framework, please see: Windwalker Framework