I’ve found that any WordPress theme uses this functions, but I don’t understand what is the purpose of it and what is it, in this case 'themify'?
Here are some examples in Themify functions.php:
1).
load_theme_textdomain( 'themify', TEMPLATEPATH.'/languages' );
2).
if (function_exists('register_nav_menus')) {
register_nav_menus( array(
'main-nav' => __( 'Main Navigation', 'themify' ),
'footer-nav' => __( 'Footer Navigation', 'themify' ),
) );
}
And in tempate file:
3). <?php _e( 'Sorry, nothing found.', 'themify' ); ?>
And many more! My doubt is what is 'themify' stand for? What is their purpose? Could I Change it or delete it? What is the place, 'themify', for?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
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
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0