In this case, 'themify'
is the defined textdomain for the Theme, used to make the Theme translatable. (Codex reference: load_theme_textdomain()
).
Making a Theme translation-ready requires a few steps.
-
Define the Theme’s textdomain:
load_theme_textdomain( 'themify', TEMPLATEPATH.'/languages' );
-
Define translatable strings in the template.
This is done using one of a few translation functions:
__()
(for returned strings),_e()
(for echoed strings), and_x()
/_ex()
(for gettext context strings). There are others, but you get the idea…A static text string, such as
<p>Hello world!</p>
, is wrapped in an appropriate translation function, such as<p><?php _e( 'Hello World!', 'themify' ); ?></p>
, to make it available for translation. -
Generate the .mo/.po files
reference on how to edit language files
Related Posts:
- Theme elements not translating
- 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?
- pass object/JSON to wp_localize_script
- Is it ok to use a function to output the text domain name in a wordpress theme
- How to concatenate inside the _e() function the right way?
- What is the purpose of an extra file for translation?
- Make a custom theme translate-ready
- Change text of twentyseventeen_edit_link()
- Should we localize custom-made themes / plugins?
- Help with “text domain”, comments_form in WordPress theme
- Theme check: Missing a text-domain
- Prevent WordPress updates from overriding custom language translations?
- Translation-readiness of Koi theme
- Some translations do not work in my template class
- My custom theme does not load the translations
- 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
- Default string not appearing want to translate
- Single translation for many locales
- comment form args are not translatable (customized comment form)
- Set parent theme language with custom .mo files
- Should all references to a text domain be to my current theme?
- Why set a second parameter in the translate function?
- Do translation functions like __e() have to take strings in English in themes?
- Translate a child theme with pure PHP and gettext
- Translate a theme with a PO file
- Theme Checker Text Domain
- 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
- Any way to permanently translate themes?
- Display Today’s date outside the loop?
- Does the functions.php file ever get called during an AJAX call? Debug AJAX
- Is there a has_more_tag() method or equivalent?
- Hide a div that is part of all pages on one specific page
- How to force Media manager to overwrite files of same name?
- Why does my short code get executed before other content?
- Enabling Widgets By Default in Custom Theme Development
- How to fix the error “file_get_contents was found in the file functions.php”?
- Identifying the priority of style.css so I can make a small CSS file load last
- What are WooCommerce starter themes? [closed]
- Modifying JS files in Child-theme
- How to support Lazy Loading Assets in a WordPress Theme?
- Wysiwyg editor for P2 theme
- Sub folder CSS that’s read by Admin panel
- Toggle Sidebar Display
- Dequeue a style file which is making website load slow!
- How to customize save function event?
- WordPress page templates in a directory
- How to move the the_excerpt’s read more link to another div
- Limit Loop to 5 Posts?
- Table of Contents Before first heading
- Theme-wide custom post template
- Zoom on custom theme without child
- Changing a slider to a grid [closed]
- What do with the index.php … [duplicate]
- How to add Space between sidebar and footer widget in WordPress theme [closed]
- Custom Navigation build using wp_nav_menu and walker
- Question regarding WP multisite feature
- “Theme without sidebar.php is deprecated”
- Is it acceptable for a WordPress theme to not accept widgets?
- my excerpts lack the ‘more’ link
- Simple child theme modification but links are broken
- Is functions.php in themes applied to all templates?
- Doing context-aware previews in the WordPress Customizer
- how do i develop a global nav and local nav to be wordpress dynamic?
- Why Tags don’t appear in my page?
- First post full width without Sidebar
- How to make a theme unable to be used on a multisite network?
- best practices for updating wordpress theme
- Multi Site Setup, Child Themes, Getting Style Sheet Directory
- if (has_custom_menu())?
- Exclude parent categories from the_category() within the loop
- How do I pass the category object to a function when is_archive() is true?
- Making a horizontal flyout menu from WordPress category listing
- Ensure SQL changes carry over
- How can I set multi archive page template on same time for only one custom post type?
- Exclude categories from wp query not working
- Copying a modified theme from one wordpress site to another wordpress site [closed]
- Show Yoast SEO meta tags in Custom WordPress Templates (Theme)
- using themename_the_custom_logo() in template-tags?
- WordPress doesn’t load css, image and js files after moving local installation folder
- Customizer Image-Picker Preview Not Working
- How to get url image page the right way?
- Mobile view logo background colour in wordpress
- page.php is not called when I load a Page
- Main Menu Theme Different Output Print
- How to reuse parts of WordPress site e.g. header, footer, part of header for multiple WordPress sites?
- IS there any reason not to include javascript in my own post’s embeds?
- How to create more templates to the same theme?
- How to send async emails in wordpress?
- Can’t select my block by clicking on it on apiVersion – but using blockProps
- Webpack does not create or update index.asset.php file in build folder