Comments (5)
Did you only install the laravel-lang/lang
package or something else?
Laravel now does not contain translation files by default and if they are not explicitly published using the php artisan lang:publish
built-in command or using our installer, then I can assume that the mcamara/laravel-localization
package cannot detect it.
In addition, I will say that the Laravel Lang
project does not provide routing capabilities. We only translate messages. The programmatic solution for changing the URL is mcamara/laravel-localization
, which we have nothing to do with.
from lang.
Thanks or the quick response!
No, I followed the instructions here: https://laravel-lang.com/installation/
So I have these installed:
laravel-lang/common
mcamara/laravel-localization
In my Kernel.php I have the LocaleSessionRedirect:
'localeSessionRedirect' => \Mcamara\LaravelLocalization\Middleware\LocaleSessionRedirect::class,
And when I use my code in a web browser, everything is working great.
But now it seems like I should be talking to mcamara/laravel-localization!
from lang.
If the Mcamara package really does not find localization files (if it does exactly that, which I cannot say), then try publishing them first by calling the console command php artisan lang:update
from lang.
I call the lang:update in the update script section in composer.json. So that is happening. I think it's something about how that package handles routing when in tests, like everything doesnt get called. I am going to go look at it from that side now.
from lang.
So, everything turned out to be even simpler: the mcamara/laravel-localization
package determines the list of available localizations from its own configuration file
.
The "Laravel Lang: Publisher" project has a list of available localizations
, but it does not meet the requirements of mcamara/laravel-localization
. We have an enum
class, and they have an associative array
.
Thus, you need to manually activate the desired localizations through the settings file.
Thank you for your message!
If you have any questions do not hesitate to contact us.
from lang.
Related Issues (20)
- The status of translations on the WWW is not up to date HOT 2
- Mail notification subcopy isn't translated! HOT 3
- Problem with transalting Laravel UI auth pages HOT 2
- /uk/ folder contains Russian translations HOT 2
- "You're logged in!" missing for Laravel Breeze HOT 1
- The documentation generator does not display the status of inline translations HOT 2
- The error message contains english text HOT 4
- Can't get it to work
- Laravel 10 is not supported yet HOT 1
- why is laravel-lang/publisher required HOT 8
- parameter `:attribute` in `de` is sometimes translated as `:Attribute` HOT 4
- Nova validation missing HOT 1
- This is a test issue
- This is a second test issue
- It's a test issue num 3
- Test num 4
- Test issue 5
- Test issue num 6
- Test issue num 7 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lang.