Blazor-Translator-Azure-Cognitive-Services

After adding the following line inside the Configure Services
method of Startup class., I received some errors.
Any suggestion is appreciated.

namespace BlazorTranslator
{
services.AddSingleton();
{
}

|Error|CS0116|A namespace cannot directly contain members such as fields or methods.
|Error|CS8124|Tuple must contain at least two elements.
|Error|CS1022|Type or namespace definition, or end-of-file expected.

Hi @sumakartala!

Welcome to the forum!

I haven’t personally worked with Blazor or Azure so I won’t be much help.

But I did find a great article in FCC news that walks you through how to create this translator.

So, hopefully that will be helpful.

Good luck!

Thanks for your suggestion and link. I actually followed the instructions of that link. I’m just a beginner and want to create an app to get Neural Machine translation.
I’m also trying to create a Microsoft WPF app in Visual Studio but got stuck in the middle. (https://docs.microsoft.com/en-us/azure/cognitive-services/translator/tutorial-wpf-translation-csharp)
It says:
Locate the MainWindow : Window class, and replace it with this code:
I could not figure out how to Locate the MainWindow : Window class.
I’d appreciate it if you could suggest me with this issue too. Thanks

Hey @sumakartala!

I am also a beginner but in web dev. So I won’t be able to offer up solutions beyond speculation :laughing: It looks really interesting though.

The only thing I have found was this line.

<Window x:Class="MSTranslatorDemo.MainWindow"

So maybe that’s it. This is located in the MainWindow.xaml .

Wish I could be more helpful.

Good luck!

Hi
Thanks for your help. The good news is I’ve successfully created my first Blazor translation app, but I doubt whether it’s giving Neural Machine translation or ordinary translation. To check it, I have to create another app with Microsoft code.
Thanks

1 Like