Skip to content

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

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

jycouet merged 4 commits into
sveltejs:mainfrom
azezsan:paraglide-text-direction

Conversation

@azezsan

@azezsan azezsan commented Feb 26, 2026 •

Copy link
Copy Markdown
Contributor

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

changeset-bot Bot commented Feb 26, 2026 •

Copy link
Copy Markdown

🦋 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

pkg-pr-new Bot commented Feb 27, 2026 •

Copy link
Copy Markdown

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 Markdown

@jycouet jycouet left a comment •

Copy link
Copy Markdown
Contributor

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
6 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