Skip to content

Instantly share code, notes, and snippets.

@thebigtine
Created November 1, 2018 11:04
Show Gist options
  • Save thebigtine/b061fe92d50b942d1bbde3fff30c0f7f to your computer and use it in GitHub Desktop.
Save thebigtine/b061fe92d50b942d1bbde3fff30c0f7f to your computer and use it in GitHub Desktop.
<?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