This documentation is for Version 1 of the Amazon CLI only. For documentation related to Version 2 of the Amazon CLI, see the Version 2 User Guide.
Amazon Translate examples using Amazon CLI
The following code examples show you how to perform actions and implement common scenarios by using the Amazon Command Line Interface with Amazon Translate.
Actions are code excerpts from larger programs and must be run in context. While actions show you how to call individual service functions, you can see actions in context in their related scenarios.
Each example includes a link to the complete source code, where you can find instructions on how to set up and run the code in context.
Topics
Actions
The following code example shows how to use import-terminology.
- Amazon CLI
-
To import a custom terminology from a file
The following
import-terminologyexample creates a terminology calledMyTestTerminologyfrom thetest-terminology.csvfile:aws translate import-terminology \ --nameMyTestTerminology\ --description"Creating a test terminology in AWS Translate"\ --merge-strategyOVERWRITE\ --data-filefileb://test-terminology.csv\ --terminology-dataFormat=CSVContents of
test-terminology.csv:en,fr,es,zh Hello world!,Bonjour tout le monde!,Hola Mundo!,???? Amazon,Amazon,Amazon,Amazon
Output:
{ "TerminologyProperties": { "SourceLanguageCode": "en", "Name": "MyTestTerminology", "TargetLanguageCodes": [ "fr", "es", "zh" ], "SizeBytes": 97, "LastUpdatedAt": 1571089500.851, "CreatedAt": 1571089500.851, "TermCount": 6, "Arn": "arn:aws:translate:us-west-2:123456789012:terminology/MyTestTerminology/LATEST", "Description": "Creating a test terminology in AWS Translate" } }-
For API details, see ImportTerminology
in Amazon CLI Command Reference.
-