Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions awscli/examples/translate/list-languages.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
**To list supported languages**
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**To list supported languages**
**Example 1: To list supported languages**


The following ``list-languages`` example lists all languages supported by Amazon Translate. ::

aws translate list-languages

Output::

{
"Languages": [
{
"LanguageName": "Afrikaans",
"LanguageCode": "af"
},
{
"LanguageName": "Albanian",
"LanguageCode": "sq"
},
{
"LanguageName": "Amharic",
"LanguageCode": "am"
},
{
"LanguageName": "Arabic",
"LanguageCode": "ar"
},
{
"LanguageName": "Armenian",
"LanguageCode": "hy"
},
{
"LanguageName": "Azerbaijani",
"LanguageCode": "az"
}
]
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please provide a "For more information" link for every example in this request. See format in the contribution guide: aws.github.io/aws-cli/docs_styleguide.html#for-more-information-link

**To list languages with a specific display language**
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**To list languages with a specific display language**
**Example 2: To list languages with a specific display language**


The following ``list-languages`` example lists supported languages with names displayed in German. ::

aws translate list-languages \
--display-language-code de

Output::

{
"Languages": [
{
"LanguageName": "Afrikaans",
"LanguageCode": "af"
},
{
"LanguageName": "Albanisch",
"LanguageCode": "sq"
},
{
"LanguageName": "Amharisch",
"LanguageCode": "am"
}
]
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please provide a "For more information" link for every example in this request. See format in the contribution guide: aws.github.io/aws-cli/docs_styleguide.html#for-more-information-link

33 changes: 33 additions & 0 deletions awscli/examples/translate/translate-text.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
**To translate text from one language to another**
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**To translate text from one language to another**
**Example 1: To translate text from one language to another**


The following ``translate-text`` example translates the text "Hello, world!" from English to Spanish. ::

aws translate translate-text \
--source-language-code en \
--target-language-code es \
--text "Hello, world!"

Output::

{
"TranslatedText": "¡Hola, mundo!",
"SourceLanguageCode": "en",
"TargetLanguageCode": "es"
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please provide a "For more information" link for every example in this request. See format in the contribution guide: aws.github.io/aws-cli/docs_styleguide.html#for-more-information-link

**To translate text with auto-detection of source language**
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**To translate text with auto-detection of source language**
**Example 2: To translate text with auto-detection of source language**


The following ``translate-text`` example translates text without specifying the source language, allowing Amazon Translate to automatically detect it. ::

aws translate translate-text \
--source-language-code auto \
--target-language-code fr \
--text "Good morning"

Output::

{
"TranslatedText": "Bonjour",
"SourceLanguageCode": "en",
"TargetLanguageCode": "fr"
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please provide a "For more information" link for every example in this request. See format in the contribution guide: aws.github.io/aws-cli/docs_styleguide.html#for-more-information-link