You shouldn’t be using a constant (in your case CORE_THEME_NAME) for the textdomain. This is because the call to __
is parsing your code, not running it. Simply said: it’s not looking up the value of the constant. So, it won’t translate. Quoting the famous Otto:
Inside all translation functions, no PHP variables are
allowed in the strings, for any reason, ever. Plain single-quoted
strings only.
Related Posts:
- What is a Theme textdomain?
- Should I change text-domain of TGM library inside theme?
- Does the textdomain have to be the theme’s name?
- How to create .pot files with POedit?
- When to use _e and __ for the translation?
- How to show a custom meta box on the “Quick Edit” screen?
- pass object/JSON to wp_localize_script
- get_template_part vs action hooks in themes
- after_setup_theme always runs
- When to use add_action(‘init’) vs add_action(‘wp_enqueue_scripts’)
- Reset positions of metaboxes in admin
- Is it ok to use a function to output the text domain name in a wordpress theme
- Getting instance variable in scope of ‘wp_enqueue_scripts’
- How to concatenate inside the _e() function the right way?
- What is a good way to pass a variable from add_action to a Theme?
- What is the purpose of an extra file for translation?
- Make a custom theme translate-ready
- How to access certain WP functions inside custom class, in theme folder
- Change text of twentyseventeen_edit_link()
- Why is save_post triggered even when I havent saved the post
- Should we localize custom-made themes / plugins?
- Add custom buttons with custom actions in Edit Post screen in WordPress?
- Help with “text domain”, comments_form in WordPress theme
- Theme check: Missing a text-domain
- Prevent WordPress updates from overriding custom language translations?
- Appending a value to metabox before and after saving
- What’s the best action to use when you want to do something only once per theme setup?
- How do I obtain the post content via a custom meta box inside the editor?
- Translation-readiness of Koi theme
- How to write .htaccess dynamically? [closed]
- More than one meta field in a single meta box?
- Some translations do not work in my template class
- wp_editor() usage in custom meta box
- Use debugging for add action events
- after_setup_theme, Global Variable and Theme Customizer
- My custom theme does not load the translations
- Is there an action for save_menu and/or update_menu?
- Is there a need for nonce with Post Metabox?
- How to make content editable from admin page?
- Simple way to get two language WP site
- How to make the_tags title translatable?
- Internationalization and functions that use it
- Translation Issue with WordPress Theme Check in comment_form function
- Custom metabox for custom page template
- Default string not appearing want to translate
- Action hook load_textdomain $domain variable
- Does the switch_theme action run when you’re upgrading a theme?
- Custom Field created in add_meta_boxes reappearing itself again in the default Custom Metabox
- Single translation for many locales
- comment form args are not translatable (customized comment form)
- WordPress taxonomy and archive custom class
- Set parent theme language with custom .mo files
- Replace function in a child theme
- Where WordPress Stores The Custom Fields Values
- Should all references to a text domain be to my current theme?
- Why set a second parameter in the translate function?
- save_post action doesn’t passing post id to my function as argument
- Wpautop in wp_editor not working
- Overide enqueue in non plugable function via child theme
- How to set Post meta-box defaults based on the choices made by user in Customizer?
- Do translation functions like __e() have to take strings in English in themes?
- Translate a child theme with pure PHP and gettext
- Load different single.php templates according to post layout selection
- Never actually adding the action? Or do I have to call the action?
- Output richtext metabox value
- Translate a theme with a PO file
- Add content after get_header
- Theme Checker Text Domain
- show_option_none not working in meta box
- How to make a function occurs for one time?
- Cart displayed above header
- how to unlocalize theme/plugin?
- WordPress theme doesn’t read my translations from pt_BR.po file
- Theme starter content translation is not working
- Menu names not getting translated
- Find callback function of custom meta box
- Any way to permanently translate themes?
- Access meta box checked value in another file
- Create new sidebars trough admin post/page metabox
- Get all Custom Post Types
- Adding Metabox Value Using the content filter
- Support Multiple featured images
- Suppress the_content filter in a nested loop
- Add custom field to existing meta box?
- add_action not working in header?
- Display Today’s date outside the loop?
- Is there a way to prevent wp_head from outputting self-closing tags?
- Is there any filter or action hook to remove layout classes from appearing in my templates?
- Theme’s featured image option is not showing up
- Add text when displying attribute with a hook on single product page
- Page template in two level deep folder
- Use of undefined constant FS_CHMOD_DIR – assumed ‘FS_CHMOD_DIR’
- Adding inline styles from a widget
- Localization / textdomain is slow and chaotic
- Theme unit test data Foreign fonts come in garbled on my machine
- WordPress Theme .mo-file won’t load
- CSS class on last post in loop ( custom query )
- add_theme_support( ‘admin-bar’ ) causes fatal error
- Place title (in correct place) above image with opaque background [closed]
- When trying to set title, not sure how to edit it for different pages