[pLog-svn] r1515 - plog/trunk/class/locale

oscar at devel.plogworld.net oscar at devel.plogworld.net
Tue Mar 15 20:20:55 GMT 2005


Author: oscar
Date: 2005-03-15 20:20:54 +0000 (Tue, 15 Mar 2005)
New Revision: 1515

Modified:
   plog/trunk/class/locale/locale.class.php
   plog/trunk/class/locale/localefinder.class.php
   plog/trunk/class/locale/locales.class.php
   plog/trunk/class/locale/pluginlocale.class.php
Log:
more documentation stuff

Modified: plog/trunk/class/locale/locale.class.php
===================================================================
--- plog/trunk/class/locale/locale.class.php	2005-03-15 19:52:38 UTC (rev 1514)
+++ plog/trunk/class/locale/locale.class.php	2005-03-15 20:20:54 UTC (rev 1515)
@@ -1,7 +1,22 @@
 <?php
 
     /**
-     * @package locale
+	 * \defgroup Locale
+	 *
+	 * The Locale module is used for localization purposes. Its main class is the Locale class
+	 * that is capable of loading very simple php files containing a big array of string identifiers
+	 * and their translations. The main method of the class is the Locale::tr() that given a string
+	 * identifier, will return the translated version.
+	 *
+	 * Locale files can also specify default encodings and very basic date and time formats (this will
+	 * be improved in next version) At the moment it is also possible to use right-to-left languages
+	 * even though there is none available yet.
+	 *
+	 * The Locales class is the preferred way to load translations from disk since it has
+	 * caching mechanisms so that we don't have to load the data everytime from disk.
+	 *
+	 * @see Locale
+	 * @see Locales
      */
 
 	include_once( PLOG_CLASS_PATH."class/object/object.class.php" );
@@ -25,6 +40,8 @@
 	define( "DEFAULT_DIRECTION", "ltr" );
 
     /**
+	 * \ingroup Locale
+	 *
      * Class used to localize messages and things such as dates and numbers.
      *
      * To use this class, we will have to provide a file containing an array

Modified: plog/trunk/class/locale/localefinder.class.php
===================================================================
--- plog/trunk/class/locale/localefinder.class.php	2005-03-15 19:52:38 UTC (rev 1514)
+++ plog/trunk/class/locale/localefinder.class.php	2005-03-15 20:20:54 UTC (rev 1515)
@@ -4,10 +4,8 @@
 	include_once( PLOG_CLASS_PATH."class/file/finder/filefinder.class.php" );
 	
 	/**
-	 * @package locale
-	 */
-
-	/**
+	 * \ingroup Locale
+	 *
  	 * updates the list of locales based on what we can find on disk. It will add new ones
 	 * and remove old ones.
 	 *

Modified: plog/trunk/class/locale/locales.class.php
===================================================================
--- plog/trunk/class/locale/locales.class.php	2005-03-15 19:52:38 UTC (rev 1514)
+++ plog/trunk/class/locale/locales.class.php	2005-03-15 20:20:54 UTC (rev 1515)
@@ -1,22 +1,21 @@
 <?php
 
-    /**
-     * @package locale
-     */
-
-
 	include_once( PLOG_CLASS_PATH."class/object/object.class.php" );
 	include_once( PLOG_CLASS_PATH."class/config/config.class.php" );
 	include_once( PLOG_CLASS_PATH."class/locale/locale.class.php" );
 	include_once( PLOG_CLASS_PATH."class/locale/pluginlocale.class.php" );
 
 	/**
+	 * \ingroup Locale
+	 *
      * Class that supports methods such as getAvailableLocales, addLocale
      * removeLocale and so on, basically to deal with locale files.
      *
-     * It also provides a singleton-like getLocale method to load and cache locale
+     * It also provides a singleton-like method called Locales::getLocale to load and cache locale
      * files from disk, so that we don't have to fetch the same file as many times
-     * as we ask for it but else, we keep a cached copy of it for later use.
+     * as we ask for it but else, we keep a cached copy of it for later use. It is advised to
+	 * use this method instead of creating a new Locale object every time we need a Locale.
+	 *
      * @see Locales::getLocale
      * @see Locale
      */

Modified: plog/trunk/class/locale/pluginlocale.class.php
===================================================================
--- plog/trunk/class/locale/pluginlocale.class.php	2005-03-15 19:52:38 UTC (rev 1514)
+++ plog/trunk/class/locale/pluginlocale.class.php	2005-03-15 20:20:54 UTC (rev 1515)
@@ -1,13 +1,10 @@
 <?php
 
-    /**
-     * @package locale
-     */
-
-
 	include_once( PLOG_CLASS_PATH."class/locale/locale.class.php" );
 	
 	/**
+	 * \ingroup Locale
+	 *
 	 * Allows plugins to provide their custom locale files, in addition to the blog-wide
 	 * ones located under the locale/ folder.
 	 * The only thing this class does is extend the _loadLocaleFile private method, so that




More information about the pLog-svn mailing list