thedevdojo / voyager

Voyager - The Missing Laravel Admin
https://voyager.devdojo.com
MIT License
11.77k stars 2.67k forks source link

Multi language is not working with relationship data #4270

Open phptest1112 opened 5 years ago

phptest1112 commented 5 years ago

Untitled2

Version information

Description

Multi language is not working with relationship data.

We have created relationship between 2 tables. when we go to edit page then relationship data is not show/translate as per selected language see the screenshots

Steps To Reproduce

Edit any relationship data

Expected behavior

All relationship data should be translate as per selected language

Screenshots

please see the screenshot Untitled1

Additional context

reksmeysrey commented 4 years ago

I have the same issue.

emptynick commented 4 years ago

Not a bug, more a feature request.

MrCrayon commented 4 years ago

To clarify: that language button purpose is to switch language for inputs, so that you can insert your translations while adding/editing BREAD records. The relationship data can't be translated there, it needs to be translated in it's own BREAD record.

If you want to change language globally (menu, labels, etc.) you need to change the language set in your profile or implement a button that does that.

vrunda-parikh commented 4 years ago

@MrCrayon can you explain how to do it step by step? "If you want to change language globally (menu, labels, etc.) you need to change the language set in your profile or implement a button that does that."

MrCrayon commented 4 years ago
vrunda-parikh commented 4 years ago

If admin want to show all the items in selected "Locale" like menu, labels, buttons, records, error messages etc.. then how to do it?

MrCrayon commented 4 years ago

Create your buttons with options from: config('voyager.multilingual.locales') make an ajax call to a method that you need to create in a controller that will change details fields in current user record and refresh the page.