laravel-code-generator icon indicating copy to clipboard operation
laravel-code-generator copied to clipboard

Adding more than one language in database

Open almiali opened this issue 7 years ago • 2 comments

Hi are the tools allow the user to add more than one language to the page

I mean that: save the name on the database as name_ar, name_en

thank you

almiali avatar Aug 28 '18 13:08 almiali

The tool generated laravel's lang file. So the view's language keys are stored in files. If you want to create a CRUD that allows that captures two different languages from the users, then feel free to add a field called "name_ar" and another one called "name_en". The the tool will create a column called "name_ar" and another name called "name_en".

If you are thinking more like one table that allows you to store all all phases in a single table, then this packages does not do that. But I would think this is something that isn't that hard to implement and possible integrate it with this package. Perhaps, there are packages for handling the translation that exists to allow you to do this.

MikeAlhayek avatar Aug 28 '18 17:08 MikeAlhayek

in the backend, you will use one language, you need it for frontend

so I think that, if you want to implement that function you need only to custom the design to add every two input in one row and each one takes col-6 if that is two languages.

in future, you can add an option to add _ar and _en to the filed

the important thing now is to allow the design to add two columns in one row

I think that function is important and very powerful because most of the sites are not one language

almiali avatar Aug 29 '18 05:08 almiali