diff --git a/material/plugins/blog/plugin.py b/material/plugins/blog/plugin.py index 375b8cfe7..7d2e5595f 100644 --- a/material/plugins/blog/plugin.py +++ b/material/plugins/blog/plugin.py @@ -800,7 +800,7 @@ class BlogPlugin(BasePlugin[BlogConfig]): # Format date def _format_date(self, date: datetime, format: str, config: MkDocsConfig): - locale = config.theme["language"] + locale: str = config.theme["language"].replace("-", "_") return format_date(date, format = format, locale = locale) # Format date for post diff --git a/src/plugins/blog/plugin.py b/src/plugins/blog/plugin.py index 375b8cfe7..7d2e5595f 100644 --- a/src/plugins/blog/plugin.py +++ b/src/plugins/blog/plugin.py @@ -800,7 +800,7 @@ class BlogPlugin(BasePlugin[BlogConfig]): # Format date def _format_date(self, date: datetime, format: str, config: MkDocsConfig): - locale = config.theme["language"] + locale: str = config.theme["language"].replace("-", "_") return format_date(date, format = format, locale = locale) # Format date for post