Translation of table contents

translation of table contents
is there a possibility to translate the content of tables / fields with $this-> translate (‘field content’)?

Hello and welcome to our forums! :smiley:

Do you mean database tables / fields or something else?

I’m currently on a project which needs translation in French and English.
For that, in my tables which needs translate fields, I create two fields like this : fieldnameFr and fieldnameEn.
When I write my query to retrieve datas, I pass the language in the function and I get the data like this : fieldname.$lang,
Where $lang is the parameter passed in my function query.

Hope it help!

Thanks for your tip :slight_smile:

That wasn’t my problem though. my problem is about selection fields such as:

Eye color => blue, brown, green …
Hair color => blonde, gray, black …

i got the problem solved in the meantime.