Skip to content

Allow a project to mix syntaxes #3

@sunny

Description

@sunny

The current solution relies on replacing the I18n.backend but does not allow a project to mix and match both syntaxes.

One solution would be to override load_file to switch syntaxes depending on the file name (.flat.yml, .locale.yml).

Another solution could be to to use different folders altogether so as not to collide with the simple loader:

I18n.backend = I18n::Backend::Chain.new(
  I18n::Backend::Simple.new, # Uses I18n.load_path
  I18n::Backend::Flat.new('config/translations/*.yml'),
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions