General info
This functionality defines which regional/language version of the SACLAB website should be shown to a user on their first visit. The system automatically detects the user’s country, browser language, forms the location and version, and may display a popup offering the user to switch to the recommended version.
When a user visits the website for the first time, the system automatically detects the country by IP, the browser language, determines the location, and calculates the site version. After that, the system forms a new URL based on these values. If the version changes, a popup may be shown offering the user to switch to the recommended version.
Location rules:
-
If country = “US” or “HK” → location = “US” or “HK”
-
If country is part of the EU → location = “EU”
-
If country is not part of the EU → location = “Global”
Version rules:
-
If country = “US” or “HK” → version = “US” or “HK”
-
If language = “en”, “de”, or “fr” → version = “en”, “de”, or “fr”
-
Else → version = “en”
URL rules:
-
new URL = old URL + version
Example: https://saclab.com/bags/ → https://saclab.com/de/bags/
-
If the old version is already “US” or “HK” → do not show popup
-
If the old URL = new URL → do not show popup
User story
As a first-time visitor of the website
I want the system to automatically determine my location and preferred language and form the recommended version of the site
So that I can access the most relevant regional and language version of SACLAB.
Acceptance Criteria
|
№ |
Acceptance criteria |
|
|---|---|---|
|
01 |
Scenario: Detect country and language |
|
|
02 |
Scenario: Determine location for US/HK |
|
|
03 |
Scenario: Determine EU location |
|
|
04 |
Scenario: Determine Global location |
|
|
05 |
Scenario: Determine version by country |
|
|
06 |
Scenario: Determine version by language |
|
|
07 |
Scenario: Default version |
|
|
08 |
Scenario: Form new URL |
|
|
09 |
Scenario: Do not show popup for US/HK |
|
|
10 |
Scenario: Do not show popup if URL unchanged |
|
|
11 |
Scenario: Show popup when version changes |
|
|
12 |
Scenario: Version Mismatch Based on Location and Language Given:
When:
Then:
|
|
|
12.1 |
Example to scenario 12: Given: User is accessing If User’s language is detected as German Else if user’s language is NOT german Then: the system shows a popup in English prompting the user to go to http://saclab.com/us/ |
|
|
Given: User is accessing If User’s language is detected as French Else if user’s language is NOT French Then: the system shows a popup in English prompting the user to go to http://saclab.com/hk/ |
||
|
13 |
Given: User is accessing saclab.com/de/ If User’s language is detected as German Else if user’s language is NOT german Then: the system shows a popup in English prompting the user to go to saclab.com/hk/ |
|
|
14 |
Given: User is accessing saclab.com/us/ (or HK) |
|
|
15 |
Scenario: User Accessing a Different Language Version Than Their Browser Language
Given:
When:
Then:
|
|
|
15.1 |
Example Scenario 15 Given: User is accessing http://saclab.com/fr/ Given: User is accessing http://saclab.com/fr/ Given: User is accessing http://saclab.com/fr/ Given: User is accessing http://saclab.com/fr/ Given: User is accessing http://saclab.com/fr/ Given: User is accessing http://saclab.com/fr/ Given: User is accessing http://saclab.com/fr/ |
|
|
16 |
|




Leave a Reply
You must be logged in to post a comment.