plugin-templates
plugin-templates copied to clipboard
Localized month and days names
This template:
{{#custom_datetime}}ddd D MMM YYYY{{/custom_datetime}}
renders to:
Fri 28 Jan 2022
but I would like to get the month and day names localized in my language, for example italian:
Ven 28 Gen 2022
Is there any way to get this?
(ps. thanks for this awesome extension).
Not sure, @CalebJohn is there a way to use joplin's i18n inside plugins?
Not sure, @CalebJohn is there a way to use joplin's i18n inside plugins?
It's not possible to access Joplin's il8n inside plugins, but you don't need it for this anyways. You only need the current locale which you can access with joplin.settings.globalValue('locale')
.
~~One related question: Why does when using {{ bowm }}
and selecting Date format
30.01.2017
but Language
English UK)
the date get rendered as 30/07/2017
and not as the specifically selected format? (Or is this a current bug?)~~
~~Would be a nice enhancement to rely on this value instead the language setting...~~
Sorry for the noise. Joplin requires a restart and then it works