@@ -278,12 +278,13 @@ def collect(self, identifier: str, options: PythonOptions) -> CollectorItem:
278278
279279 return doc_object
280280
281- def render (self , data : CollectorItem , options : PythonOptions ) -> str :
281+ def render (self , data : CollectorItem , options : PythonOptions , locale : str | None = None ) -> str :
282282 """Render the collected data.
283283
284284 Parameters:
285285 data: The collected data.
286286 options: The options to use for rendering.
287+ locale: The locale to use for rendering (default is "en").
287288
288289 Returns:
289290 The rendered data (HTML).
@@ -300,7 +301,8 @@ def render(self, data: CollectorItem, options: PythonOptions) -> str:
300301 # than as an item in a dictionary.
301302 "heading_level" : options .heading_level ,
302303 "root" : True ,
303- "locale" : self .config .locale ,
304+ # YORE: Bump 2: Regex-replace ` or .+` with ` or "en",` within line.
305+ "locale" : locale or self .config .locale ,
304306 },
305307 )
306308
@@ -401,6 +403,7 @@ def get_handler(
401403 Parameters:
402404 handler_config: The handler configuration.
403405 tool_config: The tool (SSG) configuration.
406+ **kwargs: Additional arguments to pass to the handler.
404407
405408 Returns:
406409 An instance of `PythonHandler`.
0 commit comments