Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Extending the abiltiy of Episerver.labs.language

Vote:
 

Hi,

I'm trying to extend Episerver.lab.language add-on. Basically, I want to add new properties to the Provider settings section of it.

So did anyone implement this I need to add a new property and its method so which interface should I implement to make it work?

#303796
Jun 20, 2023 8:29
Vote:
 

Hi,

If I remember right the Langugae Add-On is made up of some internal services.

You should probably start by looking at some of the Optimizely code for the langauge add on and seeing where you should start.

Some interfaces your should look at are:

  1. IMachineTranslatorProvider
  2. ITranslatorProviderConfig

Paul

#303799
Jun 20, 2023 9:12
Vote:
 

Hi Paul, 

Thank you for replying but MachineTranslatorProvider has only the Translate method in it. So I don't think we can use it.

I wanted to add extra property where I'll show how many characters have I translated so I need to show the property in UI named CharacterLimit somehow I need to add this to the Provider Setting of language manager.

Code sample will be great also.

#303803
Edited, Jun 20, 2023 9:51
Vote:
 

Hi,

I don't think i fully understand your requirement:

Are you looking to display the number of characters translated or set the number of characters / words you want to translate?

If you want a character count would something like this help?

If you want to add new settings you can implement you own ITranslatorConfig with your additional settings and use these in the implemenation of IMachineTranslator.

You could pull the settings from a separate settings content type / appsettings, up to you really how you want to implement it.

Maybe provide some screengrabs of what you want to update.

Paul

#303807
Edited, Jun 20, 2023 10:23
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.