Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
knowledgebase-front
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Applications
Knowledge Base
knowledgebase-front
Commits
70c47106
Commit
70c47106
authored
5 years ago
by
Clément
Browse files
Options
Downloads
Patches
Plain Diff
update: auto select language
parent
ddffb226
No related branches found
Branches containing commit
No related tags found
1 merge request
!104
Feature/internationalization
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitignore
+2
-1
2 additions, 1 deletion
.gitignore
www/index.html
+19
-0
19 additions, 0 deletions
www/index.html
with
21 additions
and
1 deletion
.gitignore
+
2
−
1
View file @
70c47106
...
...
@@ -8,6 +8,7 @@
/dist/lib/
/dist/oidc-client-config.json
*.iml
/www/
/www/*
!/www/index.html
package-lock.json
This diff is collapsed.
Click to expand it.
www/index.html
0 → 100644
+
19
−
0
View file @
70c47106
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/>
<meta
http-equiv=
"X-UA-Compatible"
content=
"ie=edge"
/>
</head>
<body>
<script>
const
langs
=
[
'
fr
'
,
'
en
'
];
const
defLang
=
'
en
'
;
const
userLangs
=
(
navigator
.
languages
||
[
navigator
.
language
]).
map
(
a
=>
a
.
split
(
'
-
'
)[
0
],
);
const
selectedLang
=
userLangs
.
find
(
lang
=>
langs
.
indexOf
(
lang
)
!==
-
1
);
document
.
location
.
replace
(
selectedLang
);
</script>
</body>
</html>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment