Support the ongoing development of Laravel.io →
posted 10 years ago
Packages
Last updated 2 years ago.
0

This is excellent, right what I needed. I was already half-way in assembling my own solution when I hit the problem of retrieving translated counterparts to the current URL. Via Stackoverflow I ended up on the Github page and was delighted. Thanks!

Last updated 2 years ago.
0

I use this package and offer everybody. Thanks.

Last updated 2 years ago.
0

mcamara said:

I am looking forward to hearing your opinions and suggestions!

Be careful what you wish for... you might get it :)

I'm in the process of testing and evaluating your localization package (not finished yet), but one area of the documentation that seems to be missing is a recommended/best practices directory structure for the routes and views... Everything seems to work well, but I'd like to use best practices even when evaluating.

You have this: /** ADD ALL LOCALIZED ROUTES INSIDE THIS GROUP **/ Route::get('/', function() { // This routes is useless to translate return View::make('hello'); });

So, what's your recommendation for making localization work for the "/" route? It's the Front page, so it's fairly important to get it right (and fast), and it needs to be viewed in the correct language if possible. I thought of using a switch statement, but I'm sure that's not the correct approach. What do you recommend?

So, what's your recommendation for best practices for views, routes and SEO?

One problem I did find (on Windows7) is that when I published the configuration file using the command line, it wasn't saved in UTF-8 format, so it lost the native encoding for Asian languages and probably others. Easily fixed by resaving the file from the original, but you might want to update the documentation and let people know it could happen and how to check it.

Really appreciate the time and attention you have put into this...

Brad

Last updated 2 years ago.
0

bgies said:

mcamara said:

I am looking forward to hearing your opinions and suggestions!

Be careful what you wish for... you might get it :)

I'm in the process of testing and evaluating your localization package (not finished yet), but one area of the documentation that seems to be missing is a recommended/best practices directory structure for the routes and views... Everything seems to work well, but I'd like to use best practices even when evaluating.

You have this: /** ADD ALL LOCALIZED ROUTES INSIDE THIS GROUP **/ Route::get('/', function() { // This routes is useless to translate return View::make('hello'); });

So, what's your recommendation for making localization work for the "/" route? It's the Front page, so it's fairly important to get it right (and fast), and it needs to be viewed in the correct language if possible. I thought of using a switch statement, but I'm sure that's not the correct approach. What do you recommend?

So, what's your recommendation for best practices for views, routes and SEO?

One problem I did find (on Windows7) is that when I published the configuration file using the command line, it wasn't saved in UTF-8 format, so it lost the native encoding for Asian languages and probably others. Easily fixed by resaving the file from the original, but you might want to update the documentation and let people know it could happen and how to check it.

Really appreciate the time and attention you have put into this...

Brad

Hi Brad,

First of all, thanks for your message. It's always nice to answer a well-written message like yours.

About the root route, I always put it first on the list of routes, like this: Route::group( [ 'prefix' => LaravelLocalization::setLanguage(), 'before' => 'LaravelLocalizationRedirectFilter' ], function() { Route::get("/",["as" => "home", "uses" => "HomeController@index"]); // Other routes });

About best practices for views, I always use nested folders. For example, to edit a user from the admin section I would use views/admin/users/edit.blade.php view.

Routes and SEO is really depending of Google. I'm not an expert in SEO, but I know what Google wants more or less. It prefers domain.com/user/1 to domain.com/user?id=1, and if you can translate user to other languages for different locales Google would rank you better (that's why I needed this package!! ;) ).

About the last problem, I didn't know that! I know it has 'weird' characters, but I didn't know that Windows mess it up! I would add that to documentation as soon as possible.

Thanks again for your message, if you have any other suggestion or you need help, don't hesitate to write another message!

Marc

Last updated 2 years ago.
0

Hi people!

I just updated this package to be used with Laravel 5 in the development branch -> https://github.com/mcamara/laravel-localization/tree/development

I have tested it quite deeply but I would need more eyes to test it in order to be completely clean of bugs when Laravel 5 is released so I would appreciate if the community test it! :)

Thanks!!

Last updated 9 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

mcamara mcamara Joined 2 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.