Created
December 18, 2018 14:03
-
-
Save wickywills/c7367c54d0583e4c2e909db41cad33be to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Step 1: | |
Add `languages` directory to your theme | |
Step 2: | |
Download correct `.mo` file into the `languages` directory you created | |
Step 3: | |
Generate `.po` file from the `.mo` file using PoEdit | |
Step 4 (if using child theme): | |
Add in the following to your `functions.php` file, changing the name for the parent theme: | |
``` | |
// Load translation files from your child theme instead of the parent theme | |
function my_child_theme_locale() { | |
load_child_theme_textdomain( 'YOUR-PARENT-THEME', get_stylesheet_directory() . '/languages' ); | |
} | |
add_action( 'after_setup_theme', 'my_child_theme_locale' ); | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment