Skip to content

Can't retrieve translation #26

Description

@clmnt-sg

Hi!

I'm trying to implement i18n in one of my python script. I tried to figure out how this lib works but I'm facing an issue. I didn't find how to retrieve the desired value in my yml file:

python script:

    i18n.load_path.append('template')
    i18n.set('file_format', 'yaml')
    i18n.set('locale', 'en')
    print(i18n.t('template.subject'))

yaml file (template.en.yml):

en:
  subject: Test %{filename}

But my script only prints "template.subject" and not the string.

What am I missing here ?

Thanks!

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