-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(De)serialize FluentArgs #374
Comments
It might be reasonable to provide such a trait if we are saddling people with the dependency anyway in In the mean time I can't help but wonder why you don't just serialize your data before you stuff it into |
The idea is not the store a translated text, but the prepared translation itself. I want to be able to prepare a text, which could be translated. Later, I want to load this text back into memory and translate it into any language I want (if it exists). Sure, I could create a custom Container, which just maps &str on &str like FluentArgs does. |
Serde isn't yet a run time dependency for I still can't make out what the use case is really. If you have data why can't you just keep it? Or keep a translation. I don't understand what the benefit of storing an intermediary format would be. |
I want to be able to construct a text dynamically out of multiple translations and their args. The translated text is needed later, and the language is not known during evaluation of my dynamic text. I will make an example for you: Lets say, we have a function, which should generate our text to be shown to the user.
Some sort like this. Yes, it is actually a constructed example, but it shows my idea. Now, this should be translateable into another language. This is easy. But I want to be able to translate this exact text again into another language later. My current idea is, to store the parts like this (just pseudocode): But to do this, I either need my own HashMap or FluentArgs needs to be serializeable. |
Is there a way, to store
FluentArgs
in a database or file?If not, could we get an implementation for serde Serialize and serde Deserialize?
This would allow said feature to create a non translated string and translate it later.
The text was updated successfully, but these errors were encountered: