Mehdi Khlifi
Mehdi Khlifi

Reputation: 415

Internationalization backend microservice or UI

I have a web(admin)/mobile application, the backend is written is Python and composed of many microservices, which return content to the admin application written in Angular and mobile (Android and iOS).

I'm starting to read about internationalization and reading different opinions if favor of both frontend and backend.

In my case, does it make any sense to do backend internationalization? Should I create a new microservice that handles all operations related to internationalization?

Since content is not already created on the backend side, and the user will choose his preferred language (internationalization not based on user location), wouldn't it be better to handle translation files at the deployment of the frontend app, and at the start/update of the mobile app?

Upvotes: 0

Views: 892

Answers (1)

Vaibs
Vaibs

Reputation: 1606

I would recommend handling at the server-side would be a good idea.

You need to pass Accept-Language in header with the language value. And accordingly, Microservice will return the response.

Instead of writing a new MS, you can write a small utility and use that in existing MS.

You can use the already provided functionality by the framework such as Spring, Python.

Refer to the below URL for internationalization.

https://docs.python.org/3/library/i18n.html

https://www.baeldung.com/spring-boot-internationalization

Upvotes: 1

Related Questions