When you’re using the Full Language Name option for your language switcher it is possible to change the language name that will be displayed to your users using a bit of custom code:
1. Create an empty plugin like this:
https://gist.github.com/sareiodata/76f701e01db6685829db
2. Add the following code to the end of it:
/** * Change language name. * * This is what is shown in the language switcher when full language name is selected. */ add_filter( 'trp_beautify_language_name', 'trpc_change_language_name', 10, 3 ); function trpc_change_language_name ($name, $code, $english_or_native ){ if ( $code == 'fr_CA' ){ // replace with the code of the language to change return 'Français (Canada)'; // replace with your desired language name } return $name; }
3. Modify the code by editing the language code and the language name. The rest of the languages will not change.
4. Install this plugin via FTP (copy it inside wp-content/plugins) or create a zip archive with it and install it via the WordPress plugin upload functionality