Questions tagged [laravel-translatable]

A Laravel package for translating database contents.

Laravel-Translatable is a localization package for and .

35 questions
3
votes
2 answers

Laravel and package spatie/laravel-translatable -> Make search query for special character

I use the package Spatie/laravel-translatable to store my translated data in json in the database. I have a column title : { "fr":"L\u2019\u00e9quipe", "en":"Team", "de":"Team" } As you can see, with the package, special characters are…
Jeremy
  • 1,756
  • 3
  • 21
  • 45
2
votes
1 answer

how to translate Nested Attributes on laravel validation?

I have a problem translating nested attributes on laravel validation, the code im using is like: $this->validate($request,[ 'title.*' => 'required' ]); and * can be: en, es, fa ... and other languages too the reason doing that is because we dont…
2
votes
2 answers

Combine Two Columns From DataTable

I want to combine two columns in my DataTable. I have name and surname but I want to combine them and show just one column with the full name. Blade {{ trans('labels.backend.patients.table.id') }} {{…
1
vote
0 answers

Search in laravel-translatable attr like name of type (json) with laravel scout need to write the search word in case-sensitive

Using: spatie/laravel-translatable laravel/scout The problem: If i store translation for an attribute like description as json for example description in table stored as {"ar": "السلام عليكم", "en": "Welcome"} If i…
1
vote
2 answers

How to translate Lang::get('Reset Password Notification') in ResetPassword Notification for locale?

How to translate Notification messages text? I found it's path, /vendor/laravel/framework/src/Illuminate/Auth/Notifications/ResetPassword.php' copied it's content to app/Notifications/PasswordReset.php` protected function buildMailMessage($url) { …
Aipo
  • 1,805
  • 3
  • 23
  • 48
1
vote
1 answer

Laravel search from translation table and relationship

I have three tables: products, products_translations and products_attributes. I'm also using laravel-translatable. So far I can search by the name of the product with the following code of my controller: public function search(Request $request) { …
user2519032
  • 819
  • 1
  • 18
  • 34
1
vote
1 answer

spatie / laravel-translatable shows the default locale when I try to retrieve the translation that does not exist yet

The problem is that I want a title with 3 languages (English, Italian, German). The user can add 3 titles on a form for each language which only the Italian is required. After that the titles are saved in db like this using spatie /…
Marinario Agalliu
  • 989
  • 10
  • 25
1
vote
0 answers

spatie / laravel-translatable Fields Translating

I'm using spatie/laravel-translatable package for translating some fields in my model. I have model model where declated that 'title' field is translatable attribute. When I getting list of my Model data in controller controller this field is not…
1
vote
0 answers

Laravel/Vue/Vuex is very slow with response

I'm building a laravel/vue app. I also use vuex/vuetify however it's very slow when process any code and get response data. I have researched many days however I don't know why this happens. It's difficult to explain however I will try to show…
Chu Hai
  • 69
  • 1
  • 6
1
vote
1 answer

Laravel seeding not working on cloned repository

Database seeding using laravel model factories works perfectly on my local(original) repo/laravel project file, but when I clone the remote from github,seeding throws this error: Column n ot found: 1054 Unknown column 'hr' in 'field list' (SQL:…
failedCoder
  • 1,346
  • 1
  • 14
  • 38
1
vote
0 answers

Laravel-Translatable home page url duplicate

Hi I have problem with multilanguage website. I have laravel 5.5, and I install Laravel-Translatable. When he wants to turn on the main page, the address is…
0
votes
0 answers

How can i ignore languages key when search in translated data ? spatie/laravel-translatable

i have languages table stored in DB when i search for word "en" or "ar" or "fr" it return all data from database without filtration . how can i ignore languages key when search for text to avoid return all results ? screen shoot for languages…
mahmoud
  • 1
  • 1
0
votes
1 answer

How to use Translatable fields in url parameters with route model binding?

I previously was using route-model binding with a customized key like so: Route::get('/{country:name}/{province:name}', [AdminController::class, 'locations']); This worked great for a single language, but this app has to support 2 locales. I…
0
votes
1 answer

Laravel translation strings

I translated Laravel manually, but after the translation these codes from the picture appeared. How can I handle the problem? enter image description here I tried to find these codes in the translation file but couldn't find them. I expect the…
0
votes
1 answer

How to make editor with filament/spatie-laravel-translatable-plugin

Looking at https://filamentphp.com/docs/2.x/spatie-laravel-translatable-plugin/getting-started docs I added filament/spatie-laravel-translatable-plugin ^2.17.17 into laravel 9 app with filament/filament 2.17.17 "filament/tables": "^2.17.17" and…
mstdmstd
  • 2,195
  • 17
  • 63
  • 140
1
2 3