Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed language detection for no regional variant #175 #176

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alcibiadesc
Copy link

This commit refines the approach to extracting language codes from the Accept-Language header.

By employing a unified regex pattern, the code now efficiently captures both simple language codes and those with regional variants.

The language code extraction logic now also splits on both hyphens and underscores, defaulting to the primary language code in cases of regional variants, and always converts the result to lowercase for consistent processing.

This commit refines the approach to extracting language codes from the `Accept-Language` header. 

By employing a unified regex pattern, the code now efficiently captures both simple language codes and those with regional variants. 

The language code extraction logic now also splits on both hyphens and underscores, defaulting to the primary language code in cases of regional variants, and always converts the result to lowercase for consistent processing.
Copy link

netlify bot commented Mar 21, 2024

Deploy Preview for locale-router-advanced canceled.

Name Link
🔨 Latest commit c32f1f6
🔍 Latest deploy log https://app.netlify.com/sites/locale-router-advanced/deploys/65fcb650bdf61f0008b17436

Copy link

netlify bot commented Mar 21, 2024

Deploy Preview for component-scoped-csr canceled.

Name Link
🔨 Latest commit c32f1f6
🔍 Latest deploy log https://app.netlify.com/sites/component-scoped-csr/deploys/65fcb650d69b6800080adbde

Copy link

netlify bot commented Mar 21, 2024

Deploy Preview for locale-router-static canceled.

Name Link
🔨 Latest commit c32f1f6
🔍 Latest deploy log https://app.netlify.com/sites/locale-router-static/deploys/65fcb6507d1b930008324633

Copy link

netlify bot commented Mar 21, 2024

Deploy Preview for component-scoped-ssr canceled.

Name Link
🔨 Latest commit c32f1f6
🔍 Latest deploy log https://app.netlify.com/sites/component-scoped-ssr/deploys/65fcb65055ffff000844f24a

Copy link

netlify bot commented Mar 21, 2024

Deploy Preview for one-page-example canceled.

Name Link
🔨 Latest commit c32f1f6
🔍 Latest deploy log https://app.netlify.com/sites/one-page-example/deploys/65fcb6509fa3fc0008a2978e

Copy link

netlify bot commented Mar 21, 2024

Deploy Preview for multi-page-example ready!

Name Link
🔨 Latest commit c32f1f6
🔍 Latest deploy log https://app.netlify.com/sites/multi-page-example/deploys/65fcb65019580f0008a224b2
😎 Deploy Preview https://deploy-preview-176--multi-page-example.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Mar 21, 2024

Deploy Preview for locale-param canceled.

Name Link
🔨 Latest commit c32f1f6
🔍 Latest deploy log https://app.netlify.com/sites/locale-param/deploys/65fcb6504dfcb600086ec924

Copy link

netlify bot commented Mar 21, 2024

Deploy Preview for parser-icu canceled.

Name Link
🔨 Latest commit c32f1f6
🔍 Latest deploy log https://app.netlify.com/sites/parser-icu/deploys/65fcb650ec030300096b554f

Copy link

netlify bot commented Mar 21, 2024

Deploy Preview for loaders-example canceled.

Name Link
🔨 Latest commit c32f1f6
🔍 Latest deploy log https://app.netlify.com/sites/loaders-example/deploys/65fcb6504e30df0008847fa7

Copy link

netlify bot commented Mar 21, 2024

Deploy Preview for single-load canceled.

Name Link
🔨 Latest commit c32f1f6
🔍 Latest deploy log https://app.netlify.com/sites/single-load/deploys/65fcb650ec030300096b5553

Copy link

netlify bot commented Mar 21, 2024

Deploy Preview for fallback-locale canceled.

Name Link
🔨 Latest commit c32f1f6
🔍 Latest deploy log https://app.netlify.com/sites/fallback-locale/deploys/65fcb6507d1b930008324638

Copy link

netlify bot commented Mar 21, 2024

Deploy Preview for parser-default canceled.

Name Link
🔨 Latest commit c32f1f6
🔍 Latest deploy log https://app.netlify.com/sites/parser-default/deploys/65fcb65055ffff000844f24f

Copy link

netlify bot commented Mar 21, 2024

Deploy Preview for preprocess-example canceled.

Name Link
🔨 Latest commit c32f1f6
🔍 Latest deploy log https://app.netlify.com/sites/preprocess-example/deploys/65fcb65019580f0008a224b6

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.

None yet

1 participant