Skip to content

gi18n: gi18n是否支持使用dot key用法 #4588

@YozoraTempest

Description

@YozoraTempest

What do you want to ask?

TOML 的 i18n 写法是否支持 dot key:hello.world?
似乎toml文件中出现
[hello]
world = "你好"
或者
hello.world = "你好"
写法之后,i18n不能正常使用

Image Image

以下是代码

fmt.Println(g.I18n().T(ctx, {#hello.world}))

fmt.Println(g.I18n().T(ctx, GF says: {#hello}{#world}!))

去除hello.world之后运作正常

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions