WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/01/2015 03:42:32 PM (7 years ago)
Author:
ocean90
Message:

l10n: Update wp_get_installed_translations() to support variants of a language.

  • A variant of a language has its own locale, for example the locale of the formal variant of German is de_DE_formal.
  • Update remove_accents() and some CSS rules to support de_DE_formal.
  • Add tests for get_bloginfo( 'language' ).
  • API changes will be deployed over the next few days.

see #28303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/l10n.php

    r32940 r33027  
    821821            continue;
    822822        }
    823         if ( ! preg_match( '/(?:(.+)-)?([A-Za-z_]{2,6}).po/', $file, $match ) ) {
     823        if ( ! preg_match( '/(?:(.+)-)?([a-z]{2,3}(?:_[A-Z]{2})?(?:_[a-z0-9]+)?).po/', $file, $match ) ) {
    824824            continue;
    825825        }
Note: See TracChangeset for help on using the changeset viewer.