Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
/*
* get the abbreviated language code from get_locale()
*/
public function get_locale_abbr() {
return strtok( get_locale(), "_" );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment