Wovn.cs
0.0.1
dotnet add package Wovn.cs --version 0.0.1
NuGet\Install-Package Wovn.cs -Version 0.0.1
<PackageReference Include="Wovn.cs" Version="0.0.1" />
paket add Wovn.cs --version 0.0.1
#r "nuget: Wovn.cs, 0.0.1"
// Install Wovn.cs as a Cake Addin #addin nuget:?package=Wovn.cs&version=0.0.1 // Install Wovn.cs as a Cake Tool #tool nuget:?package=Wovn.cs&version=0.0.1
Wovn.cs - WOVN.io C# library
Note: This library only works on ASP.NET pipeline.
Supported
- IIS >= (Classic/Integrated mode)
Prerequisites
Configuration
Add the following configuration to your Web.config.
Example configuration for Classic Mode
<configuration>
<configSections>
<section name="wovnLangPath" type="System.Configuration.NameValueSectionHandler" />
<section name="wovn" type="System.Configuration.NameValueSectionHandler" />
</configSections>
<wovn>
<add key="site_prefix_path" value="" />
<add key="user_token" value="******" />
<add key="url_pattern" value="path" />
<add key="default_lang" value="en" />
<add key="api_timeout" value="5000" />
</wovn>
<wovnLangPath>
</wovnLangPath>
(...)
<system.web>
<httpModules>
<add name="WovnInterceptor" type="Wovn.cs.WovnInterceptor" />
</httpModules>
</system.web>
</configuration>
Example configuration for Integrated Mode
<configuration>
<configSections>
<section name="wovnLangPath" type="System.Configuration.NameValueSectionHandler" />
<section name="wovn" type="System.Configuration.NameValueSectionHandler" />
</configSections>
<wovn>
<add key="site_prefix_path" value="" />
<add key="user_token" value="******" />
<add key="url_pattern" value="path" />
<add key="default_lang" value="en" />
<add key="api_timeout" value="5000" />
</wovn>
<wovnLangPath>
</wovnLangPath>
(...)
<system.webServer>
<modules>
<add name="WovnInterceptor" type="Wovn.cs.WovnInterceptor" />
</modules>
</system.webServer>
</configuration>
Parameters
<wovn>
parameters | required? | initial value |
---|---|---|
user_token |
required | '' |
url_pattern |
required | 'path' |
default_lang |
required | 'en' |
site_prefix_path |
optional | '' |
api_timeout |
optional | 500 |
user_token
(required)
The token for your WOVN.io project. Check this at wovn.io, under your project's Overview tab. This parameter is required.
url_pattern
(required)
Select url pattern when you add new URLs for translated pages. You can choose one of path
, subdomain
, query
.
This parameter is required.
parameter | URL(example) | Description |
---|---|---|
'path' | https://wovn.io/ja/contact | Default. |
'subdomain' | https://ja.wovn.io/contact | Need DNS configuration. |
'query' | https://wovn.io/contact?wovn=ja | Need small change your application. |
default_lang
(required)
Set default language for your sites. Check the languages you can specify from wovn.io site. English('en') is default. This parameter is required.
Wovn.cs redirects to original url when requests with default_lang parameter.
When requests to below URL with default_lang = 'en'
https://wovn.io/en/contact
redirects to
https://wovn.io/contact
site_prefix_path
(optional)
Specifies the prefix for the translated pages. ""(Empty string) is default.
For example, if prefix is set to "profile", only pages at "mysite.com/profile/..." will be translated.
api_timeout
(optional)
Maximum time to call wonv.io translation API. 500 is default, and order is milliseconds.
<wovnLangPath>
You can specify the custom values per URL path.
Case: ClassicMode
Please check This topic.
Case: IntegratedMode
Please check This topic.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net is compatible. |
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|