Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

示例代码中的多语言部分需要手工填写,如果自动生成(且易于使用和理解)则更好了 #8

Open
walterlv opened this issue Jun 16, 2020 · 0 comments

Comments

@walterlv
Copy link
Member

var languages = new Dictionary<string, IYamlCSharpDictionary[]>
{
    {
        "en-US", new IYamlCSharpDictionary[]
        {
            new dotnetCampus.YamlToCSharp.Localizations.en_US.Main(),
            new dotnetCampus.YamlToCSharp.Localizations.en_US.Extension(),
        }
    },
    {
        "zh-CN", new IYamlCSharpDictionary[]
        {
            new dotnetCampus.YamlToCSharp.Localizations.zh_CN.Main(),
            new dotnetCampus.YamlToCSharp.Localizations.zh_CN.Extension(),
        }
    },
    {
        "zh-TW", new IYamlCSharpDictionary[]
        {
            new dotnetCampus.YamlToCSharp.Localizations.zh_TW.Main(),
            new dotnetCampus.YamlToCSharp.Localizations.zh_TW.Extension(),
        }
    },
};
var dict = languages["zh-CN"].SelectMany(x => x.AsDictionary());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant