You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-government/documentation-government-cognitiveservices.md
+10-5Lines changed: 10 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -624,6 +624,10 @@ For more information, please see [public documentation](../cognitive-services/Fa
624
624
### Variations
625
625
* The URI for accessing the Text Translation API in Azure Government is:
626
626
-`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.
- You can find your custom domain endpoint in the overview blade on the Azure portal once the resource is created.
627
631
* There are 2 regions `USGovVirginia` and `USGovArizona`
628
632
### Text Translation Method
629
633
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#.
634
638
635
639
1. Create a new Console solution in Visual Studio.
636
640
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.
641
646
642
647
You can also test out different languages and texts by replacing the "text", "from", and "to" variables in Program.cs.
0 commit comments