Best location for theme translation files

Own theme

If you are using your own theme, no need to worry about, because /languages folder is in your control that way. 🙂

Other’s theme

But your concern is about other’s theme and you want to apply your translations into that theme, then the best way is to make a Child Theme. Because you are actually modifying that theme. Make your languages files and put them into your child theme’s /languages/ folder, and that’s all.

If the parent theme is already translation-ready, it’ll catch everything. But if it’s not, then make a functions.php and show the translation-files’ path:

load_theme_textdomain( 'theme-textdomain', get_stylesheet_directory() . '/languages' );

Note the get_stylesheet_directory() here, it’s because we are showing the active theme’s path. 🙂

Leave a Comment