Forum Discussion
Translate columns with google translate API
- Anonymous2 years ago
Hi Luis_Caston ,
Please update the codes for the query '' as below and check if it can return the expected result:
let fnTranslate = (original as text) as text => let Source = Json.Document( Web.Contents("https://translate.googleapis.com/translate_a/single?client=gtx&sl=es&tl=tr&dt=t&q=" & original) ), Translation = Source{0}{0}{0} in Translation, Source = CabeceraSalidas, ChangeDataType = Table.TransformColumnTypes(Source,{{"PaisDestino", type text}}), Result = Table.AddColumn( ChangeDataType, "TranslatedColumn", each fnTranslate([PaisDestino]), type text ) in ResultIn addition, you can refer the following link to get it.
Solved: Translate other languages column data into english... - Microsoft Fabric Community
You could call the Google Translate API to make the translation. By creating a custom column and then using Web.Contents to pass the Chinese text to Google Translate, it will return the English translation.
https://cloud.google.com/translate/docs/reference/rest
Best Regards
Hi Luis_Caston ,
Please update the codes for the query '' as below and check if it can return the expected result:
let
fnTranslate =
(original as text) as text =>
let
Source = Json.Document(
Web.Contents("https://translate.googleapis.com/translate_a/single?client=gtx&sl=es&tl=tr&dt=t&q=" & original)
),
Translation = Source{0}{0}{0}
in
Translation,
Source = CabeceraSalidas,
ChangeDataType = Table.TransformColumnTypes(Source,{{"PaisDestino", type text}}),
Result = Table.AddColumn(
ChangeDataType,
"TranslatedColumn",
each fnTranslate([PaisDestino]),
type text
)
in
Result
In addition, you can refer the following link to get it.
Solved: Translate other languages column data into english... - Microsoft Fabric Community
You could call the Google Translate API to make the translation. By creating a custom column and then using Web.Contents to pass the Chinese text to Google Translate, it will return the English translation.
https://cloud.google.com/translate/docs/reference/rest
Best Regards
Hi Anonymous !!!
Just amazing!! You got it!!!
Take a look:
Thank you so much!
I've been reading a lot about it and I was a little bit confused.
I leave a link to the model to another users: Google_translate_api_example