0

I'm using a package called dimsav/laravel-translatable to provide translations for some columns in a table I have. The table called Articles and has the following fields: ID, Title, Body, Picture, user_id and I'm using the package dimsav/laravel-translatable to create a translation for it. So then I created another table called Articles_Translations which contains ID, article_id, Title, Body. Both, the Title and the Body are translations of the original. Now when ever I try to get the data of the Article, I get instead its translations (the translated title, and the translated body) but the rest of the columns are fine. In my Article Model, when I delete the line :

use Translatable;

Everything goes back to normal, and I can get the original data and not the translated one. But also when I delete this line, I can't access my translated fields. Has anyone ever faced a similar problem.

marmahan
  • 183
  • 2
  • 15

1 Answers1

0

Ok, the problem was with the locales of the app. it was set to the default language of the translation. it can be changed in config/app.php

marmahan
  • 183
  • 2
  • 15