E
E
Evgeny Koryakin2019-12-15 18:11:54
API
Evgeny Koryakin, 2019-12-15 18:11:54

How to properly design the API architecture of a multilingual site?

Hello.
How to correctly design the architecture of API endpoints for a multilingual resource?
Will this option work?
/api/blog/post/112
>lang
>>ru
>>>title
>>>description
>>en
>>>title
>>>description

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan Shumov, 2019-12-15
@zettend

There is no right or wrong API format. Will work. The only question is - why give content for all languages ​​at once? With the presence of processing, you can think of something

X
xmoonlight, 2019-12-15
@xmoonlight

Chet messed up...
End-point api url = network method/function (data request)
You don't call a normal method with a cloud of parameters in the name?! And you pass parameters to it explicitly - inside the brackets.
Here - everything is 1-in-1.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question