Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MetaGer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
open-source
MetaGer
Commits
b98abbd2
Commit
b98abbd2
authored
7 years ago
by
Karl Hasselbring
Browse files
Options
Downloads
Patches
Plain Diff
Übersetzungsfunktion erweitert und Dokumentiert
parent
6aee52c1
No related branches found
Branches containing commit
No related tags found
1 merge request
!1365
Resolve "Filter Options for MetaGer"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
public/js/translations.js
+25
-2
25 additions, 2 deletions
public/js/translations.js
with
25 additions
and
2 deletions
public/js/translations.js
+
25
−
2
View file @
b98abbd2
translations
=
{
// Speichert die Übersetzungen
var
translations
=
{
'
de
'
:
{
'
de
'
:
{
'
key
'
:
'
Bitte mindestens 1 Suchmaschine auswählen.
'
'
key
'
:
'
Bitte mindestens 1 Suchmaschine auswählen.
'
},
},
...
@@ -10,4 +11,26 @@ translations = {
...
@@ -10,4 +11,26 @@ translations = {
'
es
'
:
{
'
es
'
:
{
'
key
'
:
'
Por favor, seleccione al menos un motor de búsqueda.
'
'
key
'
:
'
Por favor, seleccione al menos un motor de búsqueda.
'
}
}
}
}
\ No newline at end of file
/**
* Übersetzt den gegebenen Schlüssel in der gegebenen Sprache
* @param {string} key Zu übersetzender Schlüssel
* @param {string} lang Zu verwendende Sprache
*/
function
t
(
key
,
lang
)
{
if
(
translations
[
lang
]
&&
translations
[
lang
][
key
])
{
return
translations
[
lang
][
key
];
}
else
{
return
''
;
}
}
/**
* Übersetzt den gegebenen Schlüssel in der aktuellen Sprache des HTML-Dokuments (<html lang="...">)
* @param {string} key Zu übersetzender Schlüssel
*/
function
t
(
key
)
{
var
lang
=
$
(
'
html
'
).
attr
(
'
lang
'
);
return
t
(
key
,
lang
);
}
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