Skip to content

fix(paraglide): add text-direction support#948

Merged
jycouet merged 4 commits intosveltejs:mainfrom
azezsan:paraglide-text-direction
Feb 28, 2026
Merged

fix(paraglide): add text-direction support#948
jycouet merged 4 commits intosveltejs:mainfrom
azezsan:paraglide-text-direction

Conversation

@azezsan
Copy link
Contributor

@azezsan azezsan commented Feb 26, 2026

Closes #946

Summary

  • Adds dir attribute support to the paraglide addon so that <html> gets both lang and dir attributes set based on locale
  • Imports getTextDirection from $lib/paraglide/runtime and uses it in the server hook to replace %paraglide.dir% alongside %paraglide.lang%
  • Updates app.html to include the dir="%paraglide.dir%" placeholder on the <html> element

Test plan

  • pnpm vitest run --project cli — CLI snapshot tests pass with updated snapshots
  • pnpm vitest run --project addons -t paraglide — paraglide addon e2e test passes

Made with Cursor

@changeset-bot
Copy link

changeset-bot bot commented Feb 26, 2026

🦋 Changeset detected

Latest commit: 9581670

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
sv Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 27, 2026

Open in StackBlitz

npx https://pkg.pr.new/svelte-migrate@948
npx https://pkg.pr.new/sv@948
npx https://pkg.pr.new/@sveltejs/sv-utils@948

commit: 899fb54

@svelte-docs-bot
Copy link

Copy link
Contributor

@jycouet jycouet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx @azezsan (I added a changeset)

@jycouet jycouet merged commit cc31457 into sveltejs:main Feb 28, 2026
7 checks passed
@github-actions github-actions bot mentioned this pull request Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Paraglide missing text-direction attributes in app.html

2 participants