How to set a dual language site in wordpress?

I can separate my answer to two sections Recommended: A bit about the translation plugins Nothing wrong if you use Polylang, WPML or QTranslate or other, those plugins are widely used and are for that purpose, also actively maintained. Also, those plguins support Arabic language very well. Switching posts Plugins like Polylang, WPML and other … Read more

language_attributes for two languages?

You can use a filter to modify the value before it is set function __language_attributes($lang){ // ignore the supplied argument $langs = array( ‘en-US’, ‘KO’, ‘JA’ ); // change to whatever you want $my_language = $langs[0]; // return the new attribute return ‘lang=”‘.$my_language.'”‘; } add_filter(‘language_attributes’, ‘__language_attributes’); Then just make sure your theme header has the … Read more

Can anybody provide me with a function to generate slugs?

This post provides a function, but it cannot handle non-latin characters. That’s because URLs can’t have non-latin/ASCII characters. Browsers might show non-latin characters to you, but it’s just a user interface feature. For example, if you visit this Wiktionary URL: https://en.wiktionary.org/wiki/わかもの#Japanese, you browser URL encodes the japanese characters to get the real URL: https://en.wiktionary.org/wiki/%E3%82%8F%E3%81%8B%E3%82%82%E3%81%AE#Japanese then … Read more

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