Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

ability to replace text on template through middleware #1036

@vilarfg

Description

@vilarfg

Is your feature request related to a problem? Please describe.
I want to set up (through middleware) the lang and dir attributes for tags in template.html, and Sapper doesn't give me a chance to do so.

Describe the solution you'd like
I already implemented a solution on a PR I'm about to submit.
Basically, what it does is, look for the property replacers in the response object (affectionately known as res) and replace text on the template for every key on that property.
So, if any middleware has put anything on that property, you're good to go.

How important is this feature to you?
I need this to implement better internationalization. And internationalization is VERY important to me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions