Skip to content

Instantly share code, notes, and snippets.

@iamcanadian1973
Last active September 30, 2021 22:00
Show Gist options
  • Save iamcanadian1973/b03e7f792741510bef314b4e759ce221 to your computer and use it in GitHub Desktop.
Save iamcanadian1973/b03e7f792741510bef314b4e759ce221 to your computer and use it in GitHub Desktop.
<?php
/**
* Change the subdirectory language code from es to mx
*
* @param array $language_codes_map
*
* @return array
*/
function argo_mx_lang( $language_codes_map ) {
$language_codes_map['es'] = 'mx';
return $language_codes_map;
}
add_filter( 'wpml_language_codes_map', 'argo_mx_lang', 10, 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment