Skip to content

Dynamic key access to translations #51

Open
@ShiroYacha

Description

@ShiroYacha

Hi,

There are some use-cases (e.g. translations for enum types) where I need to access a dynamic key in runtime. I wonder if this can be achieved with the library without written mapping code in the client? At the moment I am using a workaround where I put the translations as map in a row, and do a runtime check and apply the items, e.g.

key: | en
enum.fruits | {"apple": "Apple", "banana": "Banana", "default": ""...}

But it is not very scalable compared to define "apple", "banana" as separate rows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions