How to Convert Date to Thai

Update setlocale(LC_TIME, “th_TH.UTF-8”); echo strftime(“%A %d %B %Y”, strtotime(get_the_date())); Before: อาทิตย์ 03 มกราคม 2016 //$strdate = get_thai_date(); //print_r($strdate[“number”]); //preg, strstr or others. //$strdate = date_i18n(…); After: อาทิตย์ ๐๓ มกราคม ๒๐๑๖

How to ‘manually’ load translations/test domain outside theme context?

Already found out: load_textdomain(‘my-text-domain’, TEMPLATEPATH . ‘/languages/’. $my_locale . ‘.mo’); In some cases it could be useful to restore the previous text domain, so we should make a backup. An old function I had hidden in my code that does all, is this one: function __2($string, $textdomain, $locale){ global $l10n; if(isset($l10n[$textdomain])) $backup = $l10n[$textdomain]; load_textdomain($textdomain, … Read more

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