Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP MySQL Multi-Language website
    primarykey
    data
    text
    <p>I am trying to build an English and French website by pulling the information from a MySQL table but I am stuck. I think that kind of query is too advance for me. My idea is having a table with both language translated and assign them with an ID.</p> <p>Here's the table lang</p> <blockquote> <pre><code>+--------+-------------------+----------------------+ | id | English | French | +--------+-------------------+----------------------+ | 1 | Verbal Warning | Avis verbal | | 2 | Written Warning | Avis écrit | | 3 | Evaluation | Évaluation | | 4 | Other (specify) | Autres (spécifiez) | +--------+-------------------+----------------------+ </code></pre> </blockquote> <p>Then I have another table that people inputs 'Topic' into the database. So when I switch the page to French the content of the table will display in French.</p> <blockquote> <pre><code>+-----------+---------+ | EMP_ID | Topic | +-----------+---------+ | 845689 | 4 | | 185648 | 3 | | 485497 | 1 | | 416798 | 2 | +-----------+---------+ </code></pre> </blockquote> <p>I want the ouput to be this in a table when we're on the English page</p> <blockquote> <pre><code>+-----------+------------------+ | EMP_ID | Topic | +-----------+------------------+ | 845689 | Other (specify) | | 185648 | Evaluation | | 485497 | Verbal Warning | | 416798 | Written Warning | +-----------+------------------+ </code></pre> </blockquote> <p>then this when it's the French page is selected.</p> <blockquote> <pre><code>+-----------+---------------------+ | EMP_ID | Topic | +-----------+---------------------+ | 845689 | Autres (spécifiez) | | 185648 | Évaluation | | 485497 | Avis verbal | | 416798 | Avis écrit | +-----------+---------------------+ </code></pre> </blockquote> <p>Is there a way to make it work or there's easier ways to display </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload