load_theme_textdomain()
returns TRUE
on success and FALSE
if no file was found. For debugging try the following change:
function my_theme_setup(){
$path = get_template_directory() . '/languages';
$result = load_theme_textdomain('my_theme', $path );
if ( $result )
return;
$locale = apply_filters( 'theme_locale', get_locale(), 'my_theme' );
die( "Could not find $path/$locale.mo." );
}
Related Posts:
- How to get a translated string from a language other than the current one?
- Changing the language of a single page
- Set language per post
- load_plugin_textdomain in `plugins_loaded` or `init`?
- Multiple text-domains per single plugin – admin and frontend
- How to get menu strings, categories and tags into po file for translation
- Use WordPress default text domain for translating labels
- How to add LTR to a custom theme which in RTL by default
- Use the wp-admin translations on the front end
- How can I see my theme’s text domain?
- WordPress Theme .mo-file won’t load
- How to solve a translation function issue with no arguments and missing a text-domain?
- Fix Problem With Textdomain Translation
- Qtranslate-X get raw post title value
- Interface translation without plugins
- How to use translation functions inside WordPress page
- Website Language/Locale Switching
- How to translate to a language different than the current one?
- HTML inside __() or _e() language translation string
- What is a Theme textdomain?
- Change language by clicking a button
- Override default WordPress core translation
- Different Language for Frontend vs Backend
- Setting WPLANG from a plugin
- Is it ok to use a function to output the text domain name in a wordpress theme
- Custom strings for translation using Polylang plugin
- Is a text-domain necessary for a child theme
- How to get a localized version of WordPress from a repository?
- Localization: I want the backend: english and frontend in defined language
- Working with l10n contexts (_x etc)
- How-to: Translate plural forms for themes/plugins with PoEdit
- generating po mo translating files from scratch in a wordpress theme
- How to escape the single quote character in i18n translation strings?
- How do translated, escaped strings (esc_attr) in Themes work?
- why is translation not working on theme?
- what’s different between _x() and _()
- How to handle text with function __(?
- Obtain a list of available translations
- How do I translate: “2 hours and 15 minutes”?
- Disabling Translation Update
- custom theme: english .mo file not working
- Unknown language json files
- Titles in my sidebar widget appear in all languages – with qtranslate
- How to save a translation of a plugin in “CodeStyling Localization”?
- How to escape single and plural i18n text strings?
- Force Plugin to English Translation
- How to load translation in JavaScript?
- Overwrite textdomain of plugins by default – Lost Translation
- List of Default Translated Phrases
- Make a custom theme translate-ready
- What are the most used WordPress localization?
- How to add extra language packs to WordPress
- What is the purpose of adding a .po file?
- Difference between 2 internationalization (i18n) functions __() & _e()
- How to extract translatable (double underscores and _e) strings?
- How to Translate Contact Form 7 using qTranslate? [closed]
- How to set locale in ajax requests?
- translation does not work with text_domain
- Theme elements not translating
- Translate Navigation Menu & Sidebar Widget Titles
- Localization works but still get “This plugin is not properly prepared for localization” msg in directory
- Translate content, not instance, per-post
- Translations does not work with .pot file
- Localization / textdomain is slow and chaotic
- Why should I escape translatable strings? and how shall i do that?
- How to load theme textdomain from plugin?
- How to handle single quote in a translatable string in WordPress
- Make theme translatable for WPML
- get_the_date() for translating date format
- Translation of plugin in MU-PLUGINS directory not working
- How to tell a theme to use different .mo and .po files?
- How can I make “Leave a comment” translation ready?
- Custom translation of Month names
- How to override languages files in wp-content/languages/themes with child theme
- Should i use _n for pronouns in translation?
- WordPress For Urdu Language
- I can’t translate text in my plugin using a .mo file, load_plugin_textdomain() function is always false
- How to add translation for a string
- Language Translation is not working?
- How to translate a WordPress.org plugin?
- Where the WordPress Core Translation is “actually” taking place?
- Problem in Internationalizing a plugin built for network level usage
- New plugin translation does not work
- Do i have make the content() also translation ready in theme?
- How WordPress knows where to find locale files?
- POEdit with Custom mu-plugins code
- Getting translated string through a variable
- Prepare plugin options for multi-lingual support
- Transfer from English page to Arabic page
- Make changes to translation?
- How to reload wordpress textdomains at runtime
- Gutenberg not all editor text translated
- How does WordPress choose which translation file to use?
- How to translate theme name
- How to save a translation of a plugin in “CodeStyling Localization”?
- Compile errors during translation compile
- Using polylang, how can I see which post is the “original” and which are the “translated children”? [closed]
- Is this a correct usage of esc_html_e?
- WPML Translated Term
- Proper way to create / manage gettext (.po, .pot) files?