Skip to content
Snippets Groups Projects
Commit 8bcd5a7e authored by Rolf Niepraschk's avatar Rolf Niepraschk
Browse files

Language support activated

parent a0362116
Branches
Tags 1.0.0
No related merge requests found
......@@ -71,10 +71,7 @@ def validate():
def validation():
app.logger.debug('hit validation.html')
l = str(request.accept_languages).split(',')[0][0:2]
if l != 'de':
l = 'en'
# x = '["2.4.0","2.3.0","2.2.0","2.1.1","2.1.0"]'
x = '[' + ','.join(versions) + ']'# javascript array definition as string
x = '[' + ','.join(versions) + ']'# javascript array definition
return trans.show_html(version=utils.get_version(), language=l,
xsd_versions=x)
......
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<html lang="{{LANGUAGE}}" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="description" content="DCC Validation Service">
<meta name="author" content="wactbprot">
<title>DCC Validation Service</title>
<!-- Bootstrap core CSS -->
......
......@@ -33,4 +33,4 @@ class Trans:
d = self.mapping['en']
template = 'html/validation.html'
return render_template(template, VERSION=version,
XSD_VERSIONS=xsd_versions, **d)
XSD_VERSIONS=xsd_versions, LANGUAGE=language, **d)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment