Last active
April 10, 2020 10:16
-
-
Save ocReaper/6ce3662ab720dc9e7820939aa0c1e7b6 to your computer and use it in GitHub Desktop.
WordPress mu-plugin to change the WPML language code in the URL from ja to jp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Change the Japanese subdirectory language code from ja to jp | |
* | |
* @param array $language_codes_map | |
* | |
* @return array | |
*/ | |
function akos_resch_wpml_subdirectory_language_code_ja_to_jp( $language_codes_map ) { | |
$language_codes_map['ja'] = 'jp'; | |
return $language_codes_map; | |
} | |
add_filter( 'wpml_language_codes_map', 'akos_resch_wpml_subdirectory_language_code_ja_to_jp', 10, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment