title: MySQL simple localization
body: <p>Im trying to make some sort of localization in my DB.</p>
  <p>For example I have 3 tables(img 1). Languages table contains different languages. Localization table has 3 fields: &quot;id&quot; - id of the string, 'language' - language of the string(id and language are my primary key), 'value' - localized string. tableOne has 'id', 'Col1' and 'Col2' - these fields contain IDs of the localizeable strings.</p>
  <p>So after localizing I expect to get one of green tables instead of original(depending on a language parameter).</p>
  <p>I've made it this way and it works, but I'd like to know is there any other better way to make it because now I have to create INNER JOIN block for each column, which must  be localized. Im just scared that it will be very very slow.
  I tried to create a temporary table to select all records of the required language and then i was doing the same. Inner joins, but searches should be performed only among the records of one language. But its not working because i still had to use multiple inner joins with that temp table which is impossible.</p>
  <pre><code>SELECT 
      `One`.`id` AS 'id',
      `loc1`.`value` AS 'Col1',
      `loc2`.`value` AS 'Col2'
  FROM
      `tableOne` AS `One`
          INNER JOIN
              `localization` AS `loc1` 
          ON `loc1`.`id` = `One.Col1`
          AND `loc1`.`language` = 'en'
          
          INNER JOIN
              `localization` AS `loc2` 
          ON `loc2`.`id` = `One.Col2`
          AND `loc2`.`language` = 'en'
  </code></pre>
  <p><img src="https://i.stack.imgur.com/7blhh.png" alt="enter image description here" />
  img 1</p>