There's no one-size-fits-all solution for localization. It can be really complex and include everything in the application or it can be as simple as just translating static text.
I'll try to summarize the main points of this course:
-
Translating text. You can install a package to move translations to a database/Excel sheet but that is not mandatory.
-
Translating validation/form attributes. You just use what Laravel provides.
-
Translating routes. I would recommend the https://github.com/mcamara/laravel-localization package to save a lot of time and effort.
-
Localizing dates. You can use Carbon localization feature.
-
Localizing currencies. You can use PHP's
NumberFormatter
class.
-
Translating DB Models. Not required to have a package but both spatie/laravel-translatable and astrotomic/laravel-translatable can be really beneficial.
You can also use a combination packages. For example:
I hope this course gave you a good overview of the most important packages and how to use them.
If there are any questions or suggestions, feel free to write a comment below.