From fe1ca5fa5b11d347d6fb0d50724d6e03228840eb Mon Sep 17 00:00:00 2001
From: Campbell Barton <ideasman42@gmail.com>
Date: Tue, 11 Sep 2012 02:11:06 +0000
Subject: [PATCH] commit initial support for linking to different languages
 from the wiki

---
 modules/rna_wiki_reference.py | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/modules/rna_wiki_reference.py b/modules/rna_wiki_reference.py
index 0b80e01b3..2a5b4ea9f 100644
--- a/modules/rna_wiki_reference.py
+++ b/modules/rna_wiki_reference.py
@@ -5,6 +5,18 @@
 
 url_manual_prefix = "http://wiki.blender.org/index.php/Doc:2.6/Manual/"
 
+# to make international...
+# Doc:2.6 --> FR/Doc:2.6
+
+LANG = {
+    "FRENCH":   "FR",
+    "RUSSIAN":  "RU",
+}.get(__import__("bpy").context.user_preferences.system.language)
+
+url_manual_prefix = url_manual_prefix \
+    if LANG is None \
+    else url_manual_prefix.replace("Doc:2.6", "Doc:" + LANG + "/" + "2.6")
+
 # - The first item is a wildcard - typical file system globbing
 #   using python module 'fnmatch.fnmatch'
 # - Expressions are evaluated top down (include catch-all expressions last).
-- 
GitLab