How to define theme translation file?

It all depends a bit if your current theme already supports localization. Does your theme’s function file contain something like this? load_theme_textdomain( ‘twentytwelve’, get_template_directory() . ‘/languages’ ); If not, add it in there. And change twentytwelve to your theme-directory-name. After that create a directory called languages in the root of your theme a drop your … Read more

Theme Translation?

Translation files must be named {locale}.po (e.g. en_US.po in order to be recognized. Rename your language translation file accordingly. See more in the Codex: i18n for developers.

mo / po translation files does not seem to work

Check the wp-config.php file and see if your language is defined : define(‘WPLANG’, ‘your_language’); You could add this if you’re still stuck: add_action(‘after_setup_theme’,’wpse_110727_translate_theme’); function wpse_110727_translate_theme() { load_theme_textdomain( ‘textdomain’, get_template_directory() . ‘/languages’ ); $locale = get_locale(); $locale_file = get_template_directory() . “/languages/$locale.php”; if ( is_readable( $locale_file ) ) require_once( $locale_file ); } Just put the translation files … Read more

How can I change the prev / next buttons text to Dutch?

If you’re simply using one language on your site: Find the utility.php file in your themes folder with location lib/functions/utility.php Next find the lines 227 and 231 and change the __( ‘Previous Post’, ‘contango’ ) and __( ‘Next Post’, ‘contango’ ) to your desired values. For example: previous_post_link( ‘%link’, __( ‘vorige post’, ‘contango’ ) . … Read more

Translate arguments of a user added custom code [closed]

Because you are hardcoding the link, you will need to use icl_link_to_element() function and wrap any text you want to translate inside a gettext function: <?php icl_link_to_element( ‘ID_of_your_news_page’, ‘page’, ‘<h4>’ . __(‘News’) . ‘</h4>’ ); ?> This way you will get the correct version of the link based on the current language with the text … Read more

Post types translation

Use get_post_types( [‘public’ => TRUE ], ‘objects’ );. This will return the already translated post type labels and other information. Example for tests: add_action( ‘wp_footer’, function() { $post_types = get_post_types( [ ‘public’ => TRUE, ‘_builtin’ => TRUE ], ‘objects’ // complete information, not just the name ); foreach ( $post_types as $slug => $arguments ) … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)