เขียนเว็บหลายภาษา Make laravel be website multi-languagle with old request.
หน้าแรก PHP MySQL เกร็ดความรู้ เขียนเว็บหลายภาษา Make laravel be website multi-languagle with old request.
I will say at first. This post is about hacking laravel but It dont about modifiy illuminate core. For who want to use laravel. First rule that you must remember.
| Code |
| If you want to extend, modify or hack laravel, Dont modify any files in /vendor. You should do it in /app only. |
Back to main topic of this post. My project that I do at work. I receive request about how to modify Request class change url back to url that dont have language in url.
Such as ethaizone.com/th/page/to/me (th is Thai) change back to ethaizone.com/page/to/me.
My english is weak and I think its such a pain that descript why changing Request class is solution. What is benefit. I think people who search this page from Google should know it. All I can say is It helps project can develope faster with old environment.
View code and thinking. http://paste.laravel.com/FmG
In paste, I post URL class extended version for make url languagable too. We make one system that handle multi-site with multi-language and have multi-admin system.
ปล. สำหรับคนไทย ตอนแรกผมจะพิมพ์ไทยอยู่นะ แต่ปรากฎว่าใช้แรงงานกับภาษาอังกฤษไปเยอะแล้ว ดังนั้นไปเปิดดิกเอาเองครับ
http://ethaizone.com/blog/category/laravel/
ขึ้นไปด้านบน
