load_plugin_textdomain [ WordPress Function ]
load_plugin_textdomain ( $domain, $abs_rel_path = false, $plugin_rel_path = false )
| Parameters: |
|
| Defined at: |
|
Soorgelijke functies: load_muplugin_textdomain, load_textdomain, unload_textdomain, load_default_textdomain, load_theme_textdomain
Loads the plugin's translated strings.
If the path is not given then it will be the root of the plugin directory. The .mo file should be named based on the domain with a dash, and then the locale exactly.
Source
<?php
function load_plugin_textdomain( $domain, $abs_rel_path = false, $plugin_rel_path = false ) {
$locale = apply_filters( 'plugin_locale', get_locale(), $domain );
if ( false !== $plugin_rel_path ) {
$path = WP_PLUGIN_DIR . '/' . trim( $plugin_rel_path, '/' );
} else if ( false !== $abs_rel_path ) {
_deprecated_argument( __FUNCTION__, '2.7' );
$path = ABSPATH . trim( $abs_rel_path, '/' );
} else {
$path = WP_PLUGIN_DIR;
}
$mofile = $path . '/'. $domain . '-' . $locale . '.mo';
return load_textdomain( $domain, $mofile );
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- Function Reference/load plugin textdomain « WordPress Codex
Description. Loads the plugin's translated strings. If the path is not given then it will be the root of the plugin directory. The .mo file should be named based on the ...
codex.wordpress.org - WordPress › Support » load_plugin_textdomain not working
[resolved] load_plugin_textdomain not working (11 posts) ... I maked po file and added load_plugin_textdomain('wp-hebdate') to code but the translation not ...
wordpress.org - load_plugin_textdomain | 73105
Jun 9, 2010 ... Plugin translation has never for me seemed an easy task, i could never quite follow the mish mash of differing information around the web, and ...
t31os.wordpress.com - How to use load_plugin_textdomain on activation of plugin | Milan ...
Nov 11, 2009 ... In your function that is used in register_activation_hook, you need to again use function load_plugin_textdomain, even if you loaded it already ...
blog.milandinic.com
Gebruikersdiscussies [ wordpress.org ]
- bogastyle on "load_plugin_textdomain"
- hudarsono on "load_plugin_textdomain problem"
- mjjones on "[plugin Contact Form 7] warning received"
- Mark / t31os on "load_plugin_textdomain not working"
- hatul on "load_plugin_textdomain not working"
- hatul on "load_plugin_textdomain not working"
- Mark / t31os on "load_plugin_textdomain not working"
- hatul on "load_plugin_textdomain not working"
- elfin on "load_plugin_textdomain not working"
- hatul on "load_plugin_textdomain not working"