Answer the question
In order to leave comments, you need to log in
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
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 questionAsk a Question
731 491 924 answers to any question