grammyjs / i18n

Internationalization for grammY powered by Fluent.
https://grammy.dev/plugins/i18n
MIT License
30 stars 5 forks source link

YAML support? #32

Closed n3nikita closed 1 year ago

n3nikita commented 1 year ago

I have all my locales stored in YAML files but looks like .yaml is not supported anymore. Is there a way to use .yaml files instead of .ftl

rojvv commented 1 year ago

Hey there,

TL;DR No, you can't.

This YAML support was more of an experiment. When we were stabilizing, we decided to adhere to the Fluent Localization System.

Although, if nothing is blocking you from moving to Fluent (.ftl), I suggest you do it. You will not regret after you do. And if your project is OK with the old version that was on YAML, you can just keep that!

javeoff commented 1 year ago

I prefer using yaml and will be forced to downgrade plugin version. Is better, if you revert supporting yaml both ftl @roj1512

It is conventional format, more understandable for others, who don't know programming, but want to edit localization manually

KnorpelSenf commented 1 year ago

I think what you could technically do is to read the YAML file ourself and pass as strings to the plugin.

If you want to contribute this feature to the plugin, I would be happy to review such a pull request. However, this idea first needs to be approved by someone else.