langs = list(langs_set)
langs.sort()
-def makeFooter(currentLang):
+def makeFooter(currentLang, currentPage):
text = "<p id=\"languages\">\n"
text += lang_other_langs[currentLang]
for i in range(len(langs)):
l = langs[i]
if (l == currentLang):
continue
- text += "<a href=\"index"
+ text += "<a href=\""
+ text += currentPage
if (not (l=="")):
text += "." + l
text += ".html\">"
# ick
os.remove(file)
- lang_footer = makeFooter(lang)
+ # ick
+ lang_footer = makeFooter(lang, out_filename.split('.')[0])
outfile = open( os.path.join(outdir, out_filename), 'w')
for line in lines:
text += "." + lang
text += ".html"
line = line.replace(".html", text)
+ if ((line.find("href") >= 0) and
+ (line.find("http")==-1) and
+ (line.find("pdf") >= 0)):
+ text = ""
+ if (not (lang=="")):
+ text += "." + lang
+ text += ".pdf"
+ line = line.replace(".pdf", text)
+
+
if (line.find("<!-- FOOTER -->") >= 0):
outfile.write( lang_footer )
outfile.write(line)