GodotToolkits.I18N
1.0.5
Additional Details
这些版本不能在Godot项目中正常使用
dotnet add package GodotToolkits.I18N --version 1.0.5
NuGet\Install-Package GodotToolkits.I18N -Version 1.0.5
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="GodotToolkits.I18N" Version="1.0.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="GodotToolkits.I18N" Version="1.0.5" />
<PackageReference Include="GodotToolkits.I18N" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add GodotToolkits.I18N --version 1.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: GodotToolkits.I18N, 1.0.5"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package GodotToolkits.I18N@1.0.5
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=GodotToolkits.I18N&version=1.0.5
#tool nuget:?package=GodotToolkits.I18N&version=1.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
GodotToolkits.I18N
为项目中所有属性为AdditionalFiles的csv文件,生成对应的翻译文件
生成示例
在项目中创建一个csv文件,命名为foo.csv,并修改属性为AdditionalFiles,内容如下:
id,en,zh
hello,Hello,你好
world,World,世界
会生成2个类一个索引类一个内容类
索引类
namespace GodotToolkits.I18NExtension;
#if GODOT
using global::Godot;
[GlobalClass]
public static class FooIndex : RefCounted
#else
public static class FooIndex
#endif
{
public const string hello = "hello";
public const string world = "world";
}
内容类
namespace GodotToolkits.I18NExtension;
using global::System.Collections.Generic;
public static class Foo {
public static List<Dictionary<string, string>> Data => [
@hello,
@world,
];
public static Dictionary<string, string> @hello => new()
{
{"id", "hello"},
{"en", "Hello"},
{"zh", "你好"},
};
public static Dictionary<string, string> @world => new()
{
{"id", "world"},
{"en", "World"},
{"zh", "世界"},
};
}
详细生成示例请参考示例项目
There are no supported framework assets in this package.
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- Microsoft.CodeAnalysis.CSharp (>= 4.3.0)
- Microsoft.CodeAnalysis.CSharp.Workspaces (>= 4.3.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.