Support » Plugin: The SEO Framework » og:locale Problem

  • Resolved smartyp


    I’m working on a site where the Site Language is set to ‘English (New Zealand)’, but the og:locale is being output as en_GB (i.e. the UK).

    The Timezone is also set correctly (Auckland). The admin users languages are set to ‘site default’ – I tried changing them to English (New Zealand) but locale is still output as en_GB.

    Is locale derived from something other than site language/timezone?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Sybre Waaijer


    Hello again!

    Facebook has never supported en_NZ.

    We copied their public list (archive) in the plugin, and when your WordPress locale isn’t fully matched, it uses the first match (natural sort) based on the ISO language code instead, which in your case is en_GB.

    Around mid-2017, they dropped that list. I just found a more recent page in another web archive from December 2018, which has this information hidden in the source of that page:

    en_us, ca_es, cs_cz, cx_ph, cy_gb, da_dk, de_de, eu_es, en_pi, en_ud, ck_us, es_la, es_es, gn_py, fi_fi, fr_fr, gl_es, ht_ht, hu_hu, it_it, ja_jp, ko_kr, nb_no, nn_no, nl_nl, fy_nl, pl_pl, pt_br, pt_pt, ro_ro, ru_ru, sk_sk, sl_si, sv_se, th_th, tr_tr, ku_tr, zh_cn, zh_hk, zh_tw, fb_lt, af_za, sq_al, hy_am, az_az, be_by, bn_in, bs_ba, bg_bg, hr_hr, nl_be, en_gb, eo_eo, et_ee, fo_fo, fr_ca, ka_ge, el_gr, gu_in, hi_in, is_is, id_id, ga_ie, jv_id, kn_in, kk_kz, ky_kg, la_va, lv_lv, li_nl, lt_lt, mi_nz, mk_mk, mg_mg, ms_my, mt_mt, mr_in, mn_mn, ne_np, pa_in, rm_ch, sa_in, sr_rs, so_so, sw_ke, tl_ph, ta_in, tt_ru, te_in, ml_in, uk_ua, uz_uz, vi_vn, xh_za, zu_za, km_kh, tg_tj, ar_ar, he_il, ur_pk, fa_ir, sy_sy, yi_de, qc_gt, qu_pe, ay_bo, se_no, ps_af, tl_st, gx_gr, my_mm, qz_mm, or_in, si_lk, rw_rw, ak_gh, nd_zw, sn_zw, cb_iq, ha_ng, yo_ng, ja_ks, lg_ug, br_fr, zz_tr, tz_ma, co_fr, ig_ng, as_in, am_et, lo_la, ny_mw, wo_sn, ff_ng, sc_it, ln_cd, tk_tm, sz_pl, bp_in, ns_za, tn_bw, st_za, ts_za, ss_sz, ks_in, ve_za, nr_za, ik_us, su_id, om_et, em_zm, qr_gr, iu_ca, qk_dz, qv_it, qs_de, qb_de, qe_us, bv_de und qt_us

    Again, no en_NZ… and they’ve since removed that list as well.

    Now, the only public list is found in the link below–for Messenger–wherein en_NZ isn’t listed either:

    I’ll conduct further investigation on this matter, but so far I have nothing conclusive. I’ll have to test every WordPress locale against them and see if they’re accepted; this is tedious and ultimately redundant: I don’t believe this will affect sharing in any shape or form. NZ English looks like GB English, and Facebook doesn’t seem to close users off from different locales, regardless.

    Nevertheless, you can overwrite the output, and see if Facebook accepts it via their Sharing Debugger:

    add_filter( 'the_seo_framework_oglocale_output', function( $locale ) {
    	return 'en_NZ';
    } );

    I hope this explains the lot! 🙂 Have a beautiful day!

    Wow, thanks for digging.

    I did find this which might be useful:-
    (it’s a bit vague as it doesn’t exactly state what they do or don’t support, but suggests they may support the lists they linked to..?)

    Thanks for the filter though 🙂

    Plugin Author Sybre Waaijer


    No problem!

    Seeing their past data-discrepancy and without an official word, I’m afraid to assume blindly; we must test this prior expansion.

    In other words: Test it out, and see if the code is valid or not 🙂

    Following up on this… the FB debug tool says en_NZ is NOT valid.

    But given it’s ‘technically’ valid I’ll leave the filter in place. Thanks for your help on this 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘og:locale Problem’ is closed to new replies.