Great package Colin!
In my use case, I wanted to translate custom attributes as well such as titles for divs and placeholders for text inputs. i18n has a nice solution that is quite easy to implement <div data-i18n="[title]key" /> . I already updated the function in my code by adding a third argument to the with_i18n function called attribute. If you find this useful I could send a PR.
Example:
div(
with_i18n(h1(), "main_title")
) |> with_i18n("main_title", attribute = "title")
Great package Colin!
In my use case, I wanted to translate custom attributes as well such as titles for divs and placeholders for text inputs. i18n has a nice solution that is quite easy to implement
<div data-i18n="[title]key" />. I already updated the function in my code by adding a third argument to thewith_i18nfunction calledattribute. If you find this useful I could send a PR.Example: