5

I have a situation that I had to sync my array with language files, so every time I had to generate & translate it. I was looking for a package like laravel-langman it has an option to sync. But now that I am looking, it doesn't allow me to create a key with the value using artisan commend directly without asking for input.

Any Help will be appreciated.

wibeasley
  • 5,000
  • 3
  • 34
  • 62
Payam Khaninejad
  • 7,692
  • 6
  • 45
  • 55
  • So `php artisan langman:sync` doesn't produce anything? – Bart Jun 25 '18 at 00:13
  • @Bart No somehow it does create a translation key but not support to give me full access to key & string or create it programmatically. – Payam Khaninejad Jun 25 '18 at 10:45
  • 1
    Sad to say this, but now I cannot understand your question, nor response. What do you mean by no support and full access? And what do you want to do with the key? It is autogenerated... – Bart Jun 26 '18 at 00:22
  • @Bart I need to create lang(localization) files with their translation automatically. – Payam Khaninejad Jun 26 '18 at 06:32

1 Answers1

0

You should check out this page maybe, it mentions multiple packages that solve your problem. We currently use a combination of 2 packages. I think the first one has what you want.

We use 2 packages to solve this issue, one is for the basic translations that don't get added dynamically, for this we used: waavi/translation

Now you still need it working for dynamically created or removed translations which you need if you want your models to contain multi language descriptions or something similar. For this we used: dimsav/laravel-translatable

With both of those you are all set, but you can also see if you like another package over the ones i listed.

Jester
  • 1,408
  • 1
  • 9
  • 21