Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




load_default_textdomain [ WordPress Function ]

load_default_textdomain ( No parameters )
Defined at:



Loads default translated strings based on locale.

Loads the .mo file in WP_LANG_DIR constant path from WordPress root. The translated (.mo) file is named based on the locale.

Source


<?php
function load_default_textdomain() {
    
$locale get_locale();

    
load_textdomain'default'WP_LANG_DIR "/$locale.mo" );

    if ( ( 
is_multisite() || ( defined'WP_INSTALLING_NETWORK' ) && WP_INSTALLING_NETWORK ) ) && ! file_exists(  WP_LANG_DIR "/admin-$locale.mo" ) ) {
        
load_textdomain'default'WP_LANG_DIR "/ms-$locale.mo" );
        return;
    }

    if ( 
is_admin()  )
        
load_textdomain'default'WP_LANG_DIR "/admin-$locale.mo" );

    if ( 
is_network_admin() || ( defined'WP_INSTALLING_NETWORK' ) && WP_INSTALLING_NETWORK ) )
        
load_textdomain'default'WP_LANG_DIR "/admin-network-$locale.mo" );

}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics