Wave Localization-multilanguage


Dec 11th, 2022 02:42 AM

Hello, i just look if anybody open discussion about wave multilanguage or localization manager. It is an approach that somebody take it and integrate with success?


Dec 11th, 2022 06:23 AM

Best Answer

Hi there,

For your Blade views I could suggest using the built-in Laravel localization feature as described here:

Laravel Localization

Voyager also comes with Multilanguage support:

Voyager: Multilanguage

For the data that you store in the database itself, it might be a bit more tricky, but what you could do is have separate columns for the data that you need to have in different languages, for example, let's take a Video mode with the following table:

  • id
  • title_en
  • title_fr
  • body_en
  • body_fr
  • video_url

That way, you have a column for the English title and body, and a separate column for the French translation. Then based on the currently set locale, you could display the contents of the respective column. The main downside here is that it is not very scalable, as if you have 10 different languages, then this means that you would end up with a bunch of columns.

Hope that this helps!


Dec 20th, 2022 09:10 AM

Thnx Bobby, i succeed to have most of my app translated!!!


Dec 20th, 2022 10:21 AM

That is great! Happy to hear that!


Dec 25th, 2022 05:57 AM

if Voyager also comes with Multilanguage support why should i create additional fields in the database? isn't it enough to enable translatable in models?


Dec 25th, 2022 06:47 AM

Yes, but how would this work for a post body for example where you have long text input where the user could write anything?


Dec 25th, 2022 07:01 AM

I don't understand, if I put a very long text in English and its very long translation in Italian, isn't it saved?


Dec 25th, 2022 07:32 AM

Yes, you are actually correct. You should be able to do that with Voyager directly: