mirror of https://github.com/abpframework/abp.git
csharpabpc-sharpframeworkblazoraspnet-coredotnet-coreaspnetcorearchitecturesaasdomain-driven-designangularmulti-tenancy
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.3 KiB
57 lines
1.3 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Globalization;
|
|
|
|
namespace Volo.Docs;
|
|
|
|
public class DocsWebGoogleOptions
|
|
{
|
|
public bool EnableGoogleTranslate { get; set; }
|
|
|
|
/// <summary>
|
|
/// https://cloud.google.com/translate/docs/languages
|
|
/// </summary>
|
|
public List<string> IncludedLanguages { get; set; }
|
|
|
|
public Func<CultureInfo, string> GetCultureLanguageCode { get; set; }
|
|
|
|
public bool EnableGoogleProgrammableSearchEngine { get; set; }
|
|
|
|
public string GoogleSearchEngineId { get; set; }
|
|
|
|
public DocsWebGoogleOptions()
|
|
{
|
|
EnableGoogleTranslate = false;
|
|
IncludedLanguages =
|
|
[
|
|
"en",
|
|
"tr",
|
|
"zh-CN",
|
|
"zh-TW",
|
|
"ar",
|
|
"cs",
|
|
"hu",
|
|
"hr",
|
|
"fi",
|
|
"fr",
|
|
"hi",
|
|
"it",
|
|
"pt",
|
|
"ru",
|
|
"sk",
|
|
"de",
|
|
"es"
|
|
];
|
|
GetCultureLanguageCode = culture =>
|
|
{
|
|
return culture.Name switch
|
|
{
|
|
"zh-Hans" => "zh-CN",
|
|
"zh-Hant" => "zh-TW",
|
|
_ => culture.TwoLetterISOLanguageName
|
|
};
|
|
};
|
|
|
|
EnableGoogleProgrammableSearchEngine = false;
|
|
}
|
|
}
|
|
|