Questions tagged [laravel-localization]

Laravel's localization features provide a convenient way to retrieve strings in various languages, allowing you to easily support multiple languages within your application.

Laravel's localization features provide a convenient way to retrieve strings in various languages, allowing you to easily support multiple languages within your application.

For more information about Laravel's localization functionality, see the official docs.

113 questions
1
vote
3 answers

Laravel-Localization Deployment - The requested URL /en was not found on this server

I'm deploying my first laravel app with laravel-localization. Unfortunately, I am currently getting the error, Not Found The requested URL /en was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use…
Brad Ahrens
  • 4,864
  • 5
  • 36
  • 47
1
vote
1 answer

Laravel 5 Apply user localization on API routes

I followed the tutorial from this link. And yeah, it's working great with my web routes. I have 2 supported locales, which are English(en) and Swedish(sv). I save the user's locale selection to the Session however, my app mostly consists of ajax…
Dexter Bengil
  • 5,995
  • 6
  • 35
  • 54
1
vote
1 answer

Passing a variable to a Localization route - Laravel 5.2

Using the following package: laravel-localization . I am translating the routes and followed the steps, they all work fine for routes without variables, but i'm stuck on how i should send my variables inside my views. Link inside my view :
Christophvh
  • 12,586
  • 7
  • 48
  • 70
1
vote
1 answer

laravel-localization methodnotallowed while posting a form

I'm getting MethodNotAllowedHttpException in RouteCollection.php line 218: when i'm posting form within larave-localization route group. Here is my localized route group: Route::group([ 'prefix' => LaravelLocalization::setLocale(), 'middleware' => […
yigitozmen
  • 947
  • 4
  • 23
  • 42
1
vote
1 answer

Correct way to load translated data Laravel 5.2

I am building my first multilingual Laravel website. For the translations i am using this package: laravel-localization. In my database i have the columns set up like this: title (english title) title_nl (dutch title) title_fr (french title) I…
Christophvh
  • 12,586
  • 7
  • 48
  • 70
0
votes
0 answers

laravel-localization cannot change locale via URL

I use laravel-localization for multiple language (tr-en). When I click website.com/en/example and then click website.com/tr/ornek URL become website.com/en/ornek. Is this about cache? I dont know why, how to solve this?
wertyu
  • 93
  • 1
  • 3
  • 17
0
votes
0 answers

Laravel : mcamara/laravel-localization and nwidart/laravel-modules problem

I will explain my problem with visuals now, but I will write it first. I am using mcamara/laravel-localization and nwidart/laravel-modules packages. And each module has its own json file in it, the nwidart/laravel-modules file alone works and I…
0
votes
1 answer

I don't know how to change that with Laravel Localization, in my preferred language, it seems complicated

I don't know how to change that with Laravel Localization, in my preferred language, it seems complicated. I'm a student and in my project I have to send an email that's in my own language 'Persian', but I don't know how to use Localization…
0
votes
0 answers

How can we change the locale of the client side error page in laravel based on the auth locale and without auth locale?

I have to change the language of the page like 404,403 etc in laravel with the locale. This means if the auth has a locale then the locale is the user's locale otherwise default locale. I have tried this in my handler.php file in the Exception…
Kishan
  • 11
  • 4
0
votes
0 answers

Why singleton class lose self::$instance moving to next wizard?

In laravel 9.47 / botman 2.7.8 / laravel-translatable 6.3 app I make some singleton class for working with translatable functionality when moving from one botman conversation to other with all locate functionality in class AppLocale.php. When user…
mstdmstd
  • 2,195
  • 17
  • 63
  • 140
0
votes
1 answer

How to change error message in laravel nova

I use Laravel 8.83.16 and Nova 3.32 for admin area Also I use Digitalcloud\MultilingualNova\Multilingual for lang in site I create functional and fields for users For example, field name Text::make('Name') ->sortable() ->rules('required',…
0
votes
1 answer

How to pass locale parameter from job into controller?

On laravel site making Http Post request inside of job handle I need to pass locale parameter. And this locale must be used in controller. I use astrotomic/laravel-translatable and defined in config/translatable.php with default 'en' : 'locales' =>…
Petro Gromovo
  • 1,755
  • 5
  • 33
  • 91
0
votes
1 answer

How to properly use Laravel localization language-string as vue.js script data property

I have a sweetalert inside a vue.js script (vue.js component script 2 snippet) which is working properly with two Laravel localization language-strings. Now I'm trying to use the same language strings as data properties inside another vue.js…
0
votes
0 answers

mcamara default language initialized before tenant

I have install stancl/tenancy to create multi store tenant . and i have mcamara to setup store default language from settings database table . App\Http\Middleware\Tenantenvironment if (Schema::hasTable('languages') &&…
Mo Nabil
  • 11
  • 5
0
votes
0 answers

Laravel localization does not work when using json files

Relevant configuration : Php version 8 - laravel 8. I have been trying to use laravel json translation without success and I don't understand how to make it work. The normal way using shorkeys works just fine as shown in the output below…