Changeset 12351
- Timestamp:
- 03/01/2019 04:01:28 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-cssjs.php
r12264 r12351 28 28 * (this file doesn't exist). 29 29 */ 30 $locale = sanitize_file_name( strtolower( get_locale() ) ); 30 $wp_locale = sanitize_file_name( strtolower( get_locale() ) ); 31 32 // WP uses ISO 639-2 or -3 codes for some locales, which we must translate back to ISO 639-1. 33 $iso_locales = array( 34 'bel' => 'be', 35 'bre' => 'br', 36 'kir' => 'ky', 37 'mri' => 'mi', 38 'ssw' => 'ss', 39 ); 40 41 if ( isset( $iso_locales[ $wp_locale ] ) ) { 42 $locale = $iso_locales[ $wp_locale ]; 43 } else { 44 $locale = $wp_locale; 45 } 46 31 47 $locale = str_replace( '_', '-', $locale ); 32 48 if ( file_exists( buddypress()->core->path . "bp-core/js/vendor/moment-js/locale/{$locale}{$min}.js" ) ) {
Note: See TracChangeset
for help on using the changeset viewer.