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.
Here's the table lang
+--------+-------------------+----------------------+ | id | English | French | +--------+-------------------+----------------------+ | 1 | Verbal Warning | Avis verbal | | 2 | Written Warning | Avis écrit | | 3 | Evaluation | Évaluation | | 4 | Other (specify) | Autres (spécifiez) | +--------+-------------------+----------------------+
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.
+-----------+---------+ | EMP_ID | Topic | +-----------+---------+ | 845689 | 4 | | 185648 | 3 | | 485497 | 1 | | 416798 | 2 | +-----------+---------+
I want the ouput to be this in a table when we're on the English page
+-----------+------------------+ | EMP_ID | Topic | +-----------+------------------+ | 845689 | Other (specify) | | 185648 | Evaluation | | 485497 | Verbal Warning | | 416798 | Written Warning | +-----------+------------------+
then this when it's the French page is selected.
+-----------+---------------------+ | EMP_ID | Topic | +-----------+---------------------+ | 845689 | Autres (spécifiez) | | 185648 | Évaluation | | 485497 | Avis verbal | | 416798 | Avis écrit | +-----------+---------------------+
Is there a way to make it work or there's easier ways to display