[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-www
Subject:    Fwd: Translation of wwwtesting
From:       Olaf Jan Schmidt <ojschmidt () kde ! org>
Date:       2003-02-05 12:00:22
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sorry, I skipped the leading "kde-" from kde-i18n-doc.

- ----------  Weitergeleitete Nachricht - Forwarded Mail:  ----------

Hi!

Anne-Marie mentioned on kde-www@mail.kde.org that she is thinking about
providing translated versions for edu.kde.org. This made me wonder about
the possibility to use the design of http://wwwtesting.kde.org on sites
like http://www.kde.de.

Currently, the php scripts of the new web site design automatically
include a number of English phrases. Of course it is possible to
translate these by changing the php scripts directly, but that would mean
that either changes to the php scripts have to be re-entered into all
translations, or we end up with different code everywhere.

It also would not allow different languages on _one_ site.

My idea is to introduce a very simple i18n () function for the php
scripts. There is no need to make it translate everything - which is
impossible - but the most important phrases like "Location:", "Help",
"Website settings", etc., can be translated, and some links can be
changed to point to translated versions.

This way, non-English KDE sites could use exactly the same php scripts as
the English site, and it would be easily possible to switch languages on
a per page basis.

The only requirement would be a simple line in every non-English page:

include_once ("i18n/de.inc");

before all other includes.

What do you think?

Olaf.

- -------------------------------------------------------

- -- 
Olaf Jan Schmidt, KDE Accessibility Project
KDEAP co-maintainer, maintainer of http://accessibility.kde.org

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAj5A/NYACgkQoLYC8AehV8d/UwCfa7X3R2ZZyIocua3ylKCJn7vc
GioAoJIIyCgGdv5vHfXvaIn70+OmkcWc
=p7+x
-----END PGP SIGNATURE-----

["functions.inc.patch" (text/x-diff)]

Index: kde-www/media/includes/functions.inc
===================================================================
RCS file: /home/kde/kde-www/media/includes/functions.inc,v
retrieving revision 1.25
diff -u -3 -p -r1.25 functions.inc
--- kde-www/media/includes/functions.inc	4 Feb 2003 23:50:33 -0000	1.25
+++ kde-www/media/includes/functions.inc	5 Feb 2003 10:41:31 -0000
@@ -14,6 +14,12 @@
 include_once ("classes/class_rdf.inc");
 include_once ("classes/class_menu.inc");
 
+function i18n ($text)
+{ if ($call_translate == "yes")
+    return translate ($text);
+  else return $text;
+}
+
 function kde_menu ()
 {
   global $PHP_SELF;

["de.inc" (text/x-csrc)]

<?php
/* Written by Olaf Jan Schmidt
 */

$call_translate = "yes";

function translate ($text)
{ /* This function should replace all know values of $text by a translation
   */
  return $text;
}

?>
_______________________________________________
kde-www mailing list
kde-www@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-www

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic