Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Translation for a WordPress Child Theme
<?php
/*
CHILD THEME functions.php file
*/
if ( !function_exists('child_localization')) {
function child_localization() {
load_child_theme_textdomain('child_text_domain', get_stylesheet_directory() . '/lang');
}
add_action('after_setup_theme', 'child_localization');
}
// useful debug tool : http://marketpress.com/product/debug-translations/
// thank you @jennybeaumont ;)
<?php
/*
PARENT THEME functions.php file
*/
if ( !function_exists('parent_localization')) {
function parent_localization() {
load_theme_textdomain('parent_text_domain', get_template_directory() . '/languages');
}
add_action('after_setup_theme', 'parent_localization');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.