Translate placeholder text in search field

Just as any regular string, you can use <?php esc_attr_e( ‘Your Search term here’, ‘your_theme_slug’ ); ?> So your code for the <input> would look like <input type=”search” class=”search-field” placeholder=”<?php esc_attr_e( ‘Your Search term here’, ‘your_theme_slug’ ); ?>” value=”<?php echo esc_attr( $search ); ?>” name=”s”> WPML, as well as WordPress, uses the PHP get_text() function. … Read more

What’s the best approach to do this?

about the permalinks you should go to settings->permalinks and change permalinks to “post name”. then you can see “/blog/” for your blog page. for translating your theme you dont need any plugins. you should work with .po files. go to your theme folder and then “languages”. there you can see translation files inside this folder. … Read more

New WP installation due to language issues

There isn’t really a Swedish version of WordPress although they do provide a convenient package that has the language files already loaded. The only differences from the core (English) distribution are the folder wp-content/languages, the variable $wp_local_package=”sv_SE”; set in wp-includes/version.php, the localized readme.html file and the wp-config-sample.php file. So yes, you should be safe uploading … Read more

Setting WPLANG from a plugin

In wp-includes/l10n.php you will find the function get_locale(). It offers a filter; you can set the language and ignore the constant: function get_locale() { global $locale; if ( isset( $locale ) ) return apply_filters( ‘locale’, $locale ); // WPLANG is defined in wp-config. if ( defined( ‘WPLANG’ ) ) $locale = WPLANG; // If multisite, … Read more

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