AIbit translator

FREEMIUM
By Aibitranslator | Updated 7 days ago | Translation
Popularity

9.8 / 10

Latency

859ms

Service Level

100%

Health Check

100%

Back to All Discussions

How to protect words inside an array of objects

Rapid account: E 2 Cabral
e2cabral
7 months ago

Hi! Great job you’ve done on this API. Is there a way to protect paths of objects inside arrays?

Thank you!

Rapid account: E 2 Cabral
e2cabral Commented 6 months ago

Hi, I forgot to thank you. The changes you’ve made are working fine. Thank you.

Rapid account: Thinhpham 12051996
thinhpham12051996 Commented 6 months ago

Dear @e2cabral,
We updated the translate JSON.
Now you can add common_protected_paths as array of string to protect the nested paths. Please check API endpoint to see the update.

Rapid account: E 2 Cabral
e2cabral Commented 6 months ago

When I translate an array even adding the image property as a protected path the API translates.

Before translation:
[{“name”:“apple”,“image”:“apple.jpg”},{“name”:“applesauce”,“image”:“applesauce.png”},{“name”:“apple juice”,“image”:“apple-juice.jpg”},{“name”:“apple cider”,“image”:“apple-cider.jpg”},{“name”:“apple jelly”,“image”:“apple-jelly.jpg”},{“name”:“apple butter”,“image”:“apple-jelly.jpg”},{“name”:“apple pie spice”,“image”:“garam-masala.jpg”},{“name”:“apple pie filling”,“image”:“apple-pie-slice.jpg”},{“name”:“apple cider vinegar”,“image”:“apple-cider-vinegar.jpg”},{“name”:“applewood smoked bacon”,“image”:“raw-bacon.png”}]

After translation:
[{“name”:“maçã”,“image”:“maçã.jpg”},{“name”:“compota de maçã”,“image”:“compota de maçã.png”},{“name”:“suco de maçã”,“image”:“suco de maçã.jpg”},{“name”:“cidra de maçã”,“image”:“cidra de maçã.jpg”},{“name”:“geléia de maçã”,“image”:“geléia de maçã.jpg”},{“name”:“manteiga de maçã”,“image”:“geléia de maçã.jpg”},{“name”:“tempero de torta de maçã”,“image”:“garam-masala.jpg”},{“name”:“recheio de torta de maçã”,“image”:“fatia de torta de maçã.jpg”},{“name”:“vinagre de maçã”,“image”:“vinagre de cidra de maçã.jpg”},{“name”:“bacon defumado de macieira”,“image”:“bacon cru.png”}]

The image property should be kept in English.

Thanks in advance.

Rapid account: Thinhpham 12051996
thinhpham12051996 Commented 7 months ago

Can you give me the user case or example we can add that feature and test with your data?

Join in the discussion - add comment below:

Login / Signup to post new comments