1. Home
  2. Docs
  3. CTH Directory Apps
  4. App translation

App translation

Currently the app has been translated into 12 languages. Remember that these are automatic translations from Google, so you may need to correct them.

You can find these translations in the /src/locales folder.

And please not that, change translation text value only, DO NOT change language key search: and {{variable_name}}.

Add new language

Add the code bellow to child-theme’s functions.php file to add new language for selection on app

add_filter( 'cth_mobile_languages', function($langs){
    $langs[] = array(
                'code'      => 'ar',
                'name'      => 'Arabic',
                'rtl'       => false,
            );
    return $langs;
} );

Add new .js file with filename is the adding language code ar in src/locales folder. Then copy content from en.js file to start translation

Add the language in src/helpers/i18n.js file

Was this article helpful to you? Yes 1 No 2