Skip to content

Commit 9889b19

Browse files
authored
Updated with VNET details for Translator
1 parent e6c1112 commit 9889b19

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

articles/azure-government/documentation-government-cognitiveservices.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,10 @@ For more information, please see [public documentation](../cognitive-services/Fa
624624
### Variations
625625
* The URI for accessing the Text Translation API in Azure Government is:
626626
- `https://api.cognitive.microsofttranslator.us`
627+
* [Virtual Network support](../cognitive-services/cognitive-services-virtual-networks?tabs=portal) for Translator service is limited to only `US Gov Virginia` region.
628+
The URI for accessing the API is:
629+
- `https://<your-custom-domain>.cognitiveservices.azure.us`
630+
- You can find your custom domain endpoint in the overview blade on the Azure portal once the resource is created.
627631
* There are 2 regions `USGovVirginia` and `USGovArizona`
628632
### Text Translation Method
629633
The below example uses [Text Translation - Translate method](../cognitive-services/translator/reference/v3-0-translate.md) to translate a string of text from a language into another specified language. There are multiple [language codes](https://api.cognitive.microsofttranslator.com/languages?api-version=3.0&scope=translation) that can be used with the Text Translation API.
@@ -634,10 +638,11 @@ The sample is written in C#.
634638

635639
1. Create a new Console solution in Visual Studio.
636640
2. Replace Program.cs with the corresponding code below.
637-
3. Replace the `subscriptionKey` value with the key value that you retrieved above.
638-
4. Replace the `region` value with the region value where you created your translator resource.
639-
5. Replace the `text` value with text that you want to translate.
640-
6. Run the program.
641+
3. Replace the `endpoint` value with the URI as explained in the `Variations` section.
642+
4. Replace the `subscriptionKey` value with the key value that you retrieved above.
643+
5. Replace the `region` value with the region value where you created your translator resource.
644+
6. Replace the `text` value with text that you want to translate.
645+
7. Run the program.
641646

642647
You can also test out different languages and texts by replacing the "text", "from", and "to" variables in Program.cs.
643648

@@ -659,7 +664,7 @@ namespace TextTranslator
659664
{
660665
class Program
661666
{
662-
static string host = "https://api.cognitive.microsofttranslator.us";
667+
static string host = "PASTE ENDPOINT HERE";
663668
static string path = "/translate?api-version=3.0";
664669
// Translate to German.
665670
static string params_ = "&to=de";

0 commit comments

Comments
 (0)