Answer the question
In order to leave comments, you need to log in
How not to translate names, brands, city names using Yandex api?
Can anyone tell me how to make sure that Yandex does not translate, for example, names into text, so that it does not touch words starting with a capital letter?
So far, only one thing comes to my mind, cut out these words and replace them with some kind of identifier, and after the translation, replace the identifiers with words.
let e = "Name slovo slovo Name2 slovo slovo"
// Как то пересобрать текст чтобы получить следующее
let o = {
text: "{0} slovo slovo {1} slovo slovo"
ids: ["Name", "Name2"]
}
// Произвести перевод, а после заменить {0}, {1} на нужные слова
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question