Skip to content
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

Per-recipe language #3

Closed
savissimo opened this issue Jun 6, 2022 · 4 comments
Closed

Per-recipe language #3

savissimo opened this issue Jun 6, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@savissimo
Copy link

The current language is currently being read from Obsidian's metadata, which is fine for most uses. Do you think it would be feasible to apply the localization according to the recipe's own metadata? This way, we could allow for recipes in different languages in the same vault.

A recipe could have something like:

>> language: it

which indicates that that recipe is in Italian, while others keep their own value or the default one.

@seeyouspacecorgi
Copy link
Owner

I agree it would be a nice feature and totally doable. I've been researching different ways to implement this and I'm leaning towards using settings to define the language. It seems flexible enough to allow assigning a language to a file or folder.

However I think it depends on how you use the plugin. On one hand a set key in the metadatas (which are rendered) means the recipe can't be integrally in the user's language. On the other, settings could be tedious to set up if all recipes are in the same folder.

Maybe allowing both would be the best compromise ?

@seeyouspacecorgi seeyouspacecorgi added the enhancement New feature or request label Jun 16, 2022
@savissimo
Copy link
Author

Is it possible to parse the metadata, in order to 1) exclude some from being displayed, and 2) use the value for the rendering?

@seeyouspacecorgi
Copy link
Owner

Yes it is.
Metadatas are parsed but not rendered by the plugin, I added a few lines to do that in this fork. Any metadata could either be skipped in render or hidden in css.

@seeyouspacecorgi
Copy link
Owner

The feature has been added with the last merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants