Hii,
Use ir.translation Model Directly
here is example of json-rpc :
Here’s how to create or update a French translation for a product name:
{
"jsonrpc": "2.0",
"method": "call",
"params": {
"service": "object",
"method": "execute_kw",
"args": [
"your_db",
2, // user ID
"your_password",
"ir.translation",
"create",
[{
"name": "product.template,name", // model and field
"res_id": 123, // ID of the product
"lang": "fr_FR",
"type": "model",
"value": "Nom traduit du produit",
"state": "translated"
}]
]
},
"id": 1
}
To update, search the translation first:
ids = models.execute_kw(db, uid, password,
'ir.translation', 'search', [[
['name', '=', 'product.template,name'],
['res_id', '=', 123],
['lang', '=', 'fr_FR']
]])
if ids:
models.execute_kw(db, uid, password,
'ir.translation', 'write',
[ids, {'value': 'Nouveau nom en français'}])
i hope this example is help full