XAMPPRocky / fluent-templates

Easily add Fluent to your Rust project.
Apache License 2.0
136 stars 28 forks source link

can you provide an example about integrating actix-web? #28

Closed vidyli closed 3 years ago

vidyli commented 3 years ago

this uses unic-langid, actix-web uses lantag, currently I need to convert LanguageIdentifier to langtag, which is very cumbersome

XAMPPRocky commented 3 years ago

Thank you for your issue! However I don't think this is an issue with fluent-templates. The issue is more with the language-tags or unic-langid crates. The best solution would be for one of those crates to provide a From or TryFrom implementation for one or the other, then you'd be able to easily convert between the two types.

vidyli commented 3 years ago

@XAMPPRocky thanks for you quick response, I found a easy way, simply turn Vec into string

XAMPPRocky commented 3 years ago

I mean, it might still be worth opening an issue with one of the crates, so that the conversion is part of the type system and not "stringly" typed.

zbraniecki commented 3 years ago

my hope is that we're all going to converge on icu4x_locid soon.