I
I
iGarett2016-08-02 05:21:16
MongoDB
iGarett, 2016-08-02 05:21:16

How to make multi-language support in Node.JS + MongoDB?

On Node.JS + MongoDB a small restfull api project. What is the correct way to support multiple languages ​​(application localization)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
napa3um, 2016-08-02
@iGarett

Depends on business logic. If all resources (for example, articles) are assumed to be the same for all languages, then add a mandatory lang parameter to multilingual resources to select the response language (in the style of a mandatory authorization ticket parameter). If different resources are assumed for different languages ​​(for example, articles in different languages ​​are written independently), then it makes sense to spread the API to different domains in the style of ru.service.com and en.service.com (which will also help scaling/balancing) .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question