• How is the relationship between posts in different languages established in the database? what tables and what updates?

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

    (@realloc)

    It depends on the content but these are mainly hash-maps in the options-tables.

    I have MSLS set up with two languages (“us” and “fr_FR”) and this worked for me:

    // to get the French version of an English post
    // ($post_id = id of the post in English)
    $translation_post_id = ( get_option('msls_'.$post_id) )["fr_FR"];
    
    // to get the English version of a French post
    // ($post_id = id of the post in French)
    $translation_post_id = ( get_option('msls_'.$post_id) )["us"];
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to connect posts in the database?’ is closed to new replies.