From 10beb33ea66577ba3210eaed40dbab509e4f5dbd Mon Sep 17 00:00:00 2001 From: Gehad elrobey Date: Sun, 10 Aug 2014 12:25:03 +0300 Subject: HTML: show translated words dynamically from JSON translation file. Make HTML exports Multilingual by showing dynamically the HTML words from JSON files. The needed words are translated using the translation API in subsurface. Signed-off-by: Gehad elrobey Signed-off-by: Miika Turkia Signed-off-by: Dirk Hohndel --- theme/dive_export.html | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) (limited to 'theme/dive_export.html') diff --git a/theme/dive_export.html b/theme/dive_export.html index 065a8a4f1..fd98ba442 100644 --- a/theme/dive_export.html +++ b/theme/dive_export.html @@ -38,6 +38,10 @@ function load_scripts() fileref.setAttribute("src", location.pathname + "_files/stat.json"); document.getElementsByTagName("head")[0].appendChild(fileref); + fileref=document.createElement('script'); + fileref.setAttribute("src", location.pathname + "_files/translation.json"); + document.getElementsByTagName("head")[0].appendChild(fileref); + fileref=document.createElement('script'); fileref.setAttribute("src", location.pathname + "_files/settings.json"); document.getElementsByTagName("head")[0].appendChild(fileref); @@ -127,6 +131,9 @@ window.onload=function(){ document.body.style.visibility='visible'; document.onkeydown = switchDives; + + //translate Page + translate_page(); } function changeAdvSearch(e){ @@ -145,7 +152,8 @@ function changeAdvSearch(e){
- Advanced Search + + Advanced Search
@@ -188,7 +196,7 @@ function changeAdvSearch(e){
- +
@@ -197,7 +205,7 @@ function changeAdvSearch(e){

-

Dive profile

+

Dive profile

@@ -224,7 +232,7 @@ function changeAdvSearch(e){
- +
-- cgit v1.2.3-70-g09d2