Skip to content

Conversation

@davidwessman
Copy link
Collaborator

args: [:locale, :locale_to_translate_from, arg(:data_format).from(1), :translation_backend]

def translate(opts = {})
forest = i18n.tree(opts[:from])
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@glebm Do you have a suggestion for creating a tree with all keys from opts[:from] locale to send into the translate_forest method? I have tried a few ways but cannot figure out the correct format.

Copy link
Owner

@glebm glebm Jun 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The forest root nodes should be the locales to translate to (the target locales).

For example, {"en": {"key": "..."}}

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

Successfully merging this pull request may close these issues.

3 participants