Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Chouby

    (@chouby)

    You can get the language of a post with:

    global $polylang;
    $lang = $polylang->model->get_post_language($post_id); // $post_id is the post id
    if ($lang)
      echo $lang->locale; // you can choose other properties slug or name

    html:lang(fr) .post-810 { ... }

    Supported in IE8+.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Post language in it's css class?’ is closed to new replies.