meta info
Title: Use SYSTRAN.io Translation For Localization
Keywords: localization, asp.net-core, translate, online, systran.io, service
Description: Learn how to use systran.io translation service for localization of Asp.Net Core web apps with XLocalizer.Translate.
Author: Ziya Mollamahmut
Date: 08-Aug-2020
Image: https://github.com/LazZiya/Docs/raw/master/XLocalizer/v1.0/images/xlocalizer-logo.png
Image-alt: XLocalizer Logo
Version: v1.0
Use SYSTRAN.io Translate For Localization
By Ziya Mollamahmut
This nuget is based on the free plan of Systran Translate via RapidAPI .
See GitHub repo
Install
PM > Install-Package XLocalizer.Translate.SystranTranslate
{
"XLocalizer.Translate" : {
"RapidApiKey" : " ..." ,
}
}
Right click on the project name and select Manage User Secrets
Register in startup
services . AddHttpClient < ITranslator , SystranTranslateServiceRapidApi > ( ) ;
Use with XLocalizer
// Configure XLocalizer to use the translation service
// and enable online translation
services . AddRazorPages ( )
. AddXLocalizer < LocSource , SystranTranslateServiceRapidApi > ( ops =>
{
// ...
ops . AutoTranslate = true ;
} ) ;