If you’re a website owner or content creator, you may have heard the term OpenGraph Tags, or og:locale. This type of tag plays an important role in how your content is shared and displayed across social media.
OpenGraph tags are HTML tags that allow a website to specify what information should be displayed when a user shares a link on social media. It is used to create a more engaging post since it allows you to display an image, title and description of the content, as well as other useful metadata.
The og:locale tag is one of the key tags within these OpenGraph tags. It is used to specify what language and region the page was created for. It is important to include this tag when creating a page for international users, since it allows the page to be properly localized on social media.
The value of the og:locale tag corresponds with two ISO 639-1 codes for language and ISO 3166-1 Alpha 2 code for country. For example, if you wanted to localize your page for France, you would use this tag:
<meta property=”og:locale” content=”fr_fr” />
By including this tag, your page will be correctly localized on French social media
og:locale
Defines the content language.
Syntax
<meta property=”og:locale” content=”en_GB” />
Best practices
Use only for content not written in American English (en_US). Facebook assumes content without this tag is written in this language.OpenGraph has a limited list of supported og:locale designations. If your locale is not in this list, our plugin will output the best match for your language.
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, es_mx, 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