From eae87ee0ecebb6df34ad5c6086f0223c93e7d491 Mon Sep 17 00:00:00 2001 From: Stefan Ritter Date: Wed, 17 Feb 2010 09:26:59 +0100 Subject: Added language option * 'language' in section 'style' can be de, at, en, us, ... --- blogthon.cgi | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'blogthon.cgi') diff --git a/blogthon.cgi b/blogthon.cgi index 4cec664..c8c5a61 100755 --- a/blogthon.cgi +++ b/blogthon.cgi @@ -109,6 +109,13 @@ if not os.path.exists(plugins_dir): try: style = configuration.get('look', 'style') except: errorpage('"style" is missing in configuration!') +try: language = configuration.get('look', 'language') +except: errorpage('"language" is missing in configuration!') +if language == "de" or language == "at": + locale = ("Seiten", "Monate", "Links", "Keine Kommentare", "Kommentare", "Alle Einträge anzeigen...", "Name", "Text", "Absenden") +else: + locale = ("pages", "months", "links", "no comments", "comments", "View all entries...", "name", "text", "commit") + try: entries_per_page = configuration.getint('look', 'entries_per_page') except: errorpage('"entries_per_page" is missing in configuration!') @@ -346,7 +353,7 @@ else: staticpages_list = glob.glob(staticpages_dir + '*') staticpages_list.sort() print '
' - print '
pages
' + print '
' + locale[0] + '
' print '
' print '
    ' for staticpage in staticpages_list: @@ -370,7 +377,7 @@ else: if monthlist == "True": olddate = "" print '
    ' - print '
    months
    ' + print '
    ' + locale[1] + '
    ' print '
    ' print '
      ' for entry in entries: @@ -388,7 +395,7 @@ else: # Linklist if linklist == "True": print ' ' print '' @@ -543,7 +550,7 @@ else: for line in comments_content: if line.split(".", 1)[0] == "-": comments_counter += 1 print '
      ' - print ' comments (' + str(comments_counter) + ')' + print ' ' + locale[4] + ' (' + str(comments_counter) + ')' print '
      ' print '
    ' print '' @@ -556,7 +563,7 @@ else: entry_counter += 1 if not month_display and not post_display and not allentries_display and entry_counter == entries_per_page: # Display pagelist - print '
    View all entries...
    ' + print '
    ' + locale[5] + '
    ' print '
    ' print '' -- cgit v1.2.3