Having a two language website

Convert your site to a multisite, then … Create a second site. Set the site language to Persian in Options/General. Set the language of the first site to English. You can install a plugin to link translated posts like MultilingualPress (disclosure: I was the lead developer for that plugin for a long time). You can … Read more

Change localization only for plugin

Use plugin_locale filter: apply_filters( ‘plugin_locale’, $locale, $domain ); Change locale like this: $my_plugin_domain = ‘my_plugin_domain_name’; $override_locale=”es-ES”; add_filter(‘plugin_locale’, function ($locale, $domain) use ($my_plugin_domain, $override_locale) { if($domain == $my_plugin_domain) { $locale = $override_locale; } return $locale; }, 10, 2);

Language Switch Function

You are now only testing for the theme location not to be empty. This means that every non empty menu location will see the language button attached. So, in stead of testing for emptyness you should be testing for a specific location. The name of that location depends on your theme, but suppose it’s called … Read more

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