A
A
arseniylebedev2019-01-14 17:14:59
Laravel
arseniylebedev, 2019-01-14 17:14:59

What is the best way to localize an application?

Where is the best place to store locale data? Only these options come to mind:
1) Store in cookies.
2) In routes.
I don't use frontend frameworks.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikolai Parotikov, 2019-01-24
@parotikov

If you have a monolithic application, then you can use cookies (well, or sessions). The cookie is set to the language from the user's default settings.
If you have a client-server application, then the locale is stored in the application (storage for a web client, or sqlite for a mobile client, for example) and is passed in the request parameters to the server.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question