    NLS (Greek NLS translations)
   , S.Xenitellis@rhbnc.ac.uk
  v0.9, 21  1999

          GNU
  .   GNU  (   
       Unix   ls, mutt, kde,
  gnome)         
          .    
       .
  ______________________________________________________________________

  Table of Contents





















































  1. 

     1.1  
     1.2    "NLS";

  2.   NLS

     2.1       ;
     2.2      NLS;
     2.3 ,    NLS;
     2.4    NLS;
     2.5   

  3. NLS  

     3.1    NLS
     3.2     !
     3.3  ()            ;
     3.4      
     3.5  

  4.   

     4.1        ;
     4.2 ,     NLS  ;
     4.3           ;
        4.3.1  gettext
        4.3.2 
        4.3.3 
        4.3.4  

  5.     

     5.1       .. "Broken pipe"; " ";
     5.2 LEXIS
     5.3  

  6.  

     6.1  
     6.2  
     6.3  
     6.4  
     6.5          ;

  7.    

  8. 

     8.1      

  9.  

  10.     Linux

  11. PO 

  12. 

     12.1        ;


  ______________________________________________________________________



  [1m1.  [0m


  [1m1.1.   [0m


    v0.1 - 09  1999 -   -  

    v0.2 - 24  1999 -   -  

    v0.3 - 14  1999 -   -  

    v0.4 - 24  1999 -   -  
      Hellug (http://www.hellug.gr)

    v0.5 - 15  1999 -   -  ,
      KDE, Gnome

    v0.6 - 22  1999 -   -   
     ,   

    v0.7 - 24  1999 -   -  
     ,      ,
         Lyx,    
     ,    ,  
         Linux,  

    v0.8 - 25  1999 -   -  

    v0.9 - 21  1999 -   -  
     shadow utils


  [1m1.2.     "NLS";[0m

   [1mNLS (National Language Support) [22m     
            
            
   .  ,     
        .     ,
          
  ,   ,     
        .     
          .


  [1m2.    NLS[0m



  [1m2.1.        ;[0m

          
          .  ,
           
   .  ,       ,
   ,  ,     .   
           
    ,        
  Linux         NLS.


  [1m2.2.       NLS;[0m

   [1m  [22mLinux      
   NLS.   Linux <http://www.linux.gr>  
          GNU
  <http://www.gnu.org>.   ,     NLS.
     Linux,     Unix 
  -Unix    NLS.


  [1m2.3.  ,    NLS;[0m

     ,      
  gettext.         
   (link)       . 
    ,     . 
          
          .


  [1m2.4.     NLS;[0m

       .


  1.  GNU 

             GNU
     Translation Project        FSF (Free
     Software Foundation).      
     Unix  .       
     GNU       ,  
             GNU. ,
               
       .    ,  
         ,    
          GNU   .


  2.  GNU 

        ,    
            GNU,  NLS.
        ,      
           .   
         KDE  Gnome,   
             .


  3. KDE

        KDE <http://www.kde.org>   
           NLS.  KDE
              
     ,     .


  4. Gnome

        Gnome <http://www.gnome.org>, ,
       KDE,       
      NLS.  To Gnome      
              
     Unix.


  [1m2.5.    [0m

         

           

      

      

         

        


  [1m3.  NLS  [0m



  [1m3.1.     NLS[0m


    


       RedHat-6.0: /usr/share/locale ( )



       RedHat-5.x: /usr/share/locale



       RedHat-4.x: /usr/share/locale ( )



       Open Linux 2.2: /usr/share/locale ( )



       SuSe 6.: /usr/share/locale ( )



       Slackware 4.0: /usr/share/locale ( )



       Debian 2.x: /usr/share/locale ( )


           .
     , , ,  .

     es   LC_MESSAGES, 
  /usr/share/es/LC_MESSAGES/      "fileutils.mo".
  ,      ls, mkdir .  ( 
   el         ,
          es).

  T


    setenv LANGUAGE es     (    tcsh   
     csh) 

    export LANGUAGE es     (    bash    sh)


    "ls --help"     !


  [1m3.2.      ![0m


             
   Linux.

          
      ( locale).  
     ,     
  NLSPATH.          
  ,        
   ,  libc.  "strace -o output.log ls --help"
    "grep open output.log"       .
      NLSPATH.


  [1m3.3.   ()       [0m
  [1m    ;[0m

    .   ,   
         .   
          [1mLANG[22m,  
  


    setenv LANG el     (    tcsh    csh) 

    export LANG=el     (    bash    sh)

  ,    LANGUAGE,    
    LANG.

      glibc 2.1 (   RedHat 6.0),  
     ( )

    setenv LANG greek     (    tcsh    csh)
     

    export LANG=greek     (    bash    sh)


  [1m3.4.       [0m

  T

    setenv LANGUAGE 'it:fr'     (    tcsh  
      csh) 

    export LANGUAGE='it:fr'     (    bash  
      sh)

     ,      .


  [1m3.5.   [0m

         
  <mailto:nmav@hellug.gr>.

     nls      
   (     GNU ), 
           
         .
     gettext        
     GNU LGPL        
    .        
  (!).

      ""     . 
        GNU autoconf  gettext-0.10,
       gnu mirror.

        / 
  (nls)      C.     , 
      :

  ______________________________________________________________________
  #include <stdio.h>
  #include <time.h>

  main ()
  {
          time_t tv;

          printf( "The time is: " );
          time(&tv);
          printf ( "%s",ctime(&tv) );

  }
  ______________________________________________________________________



          .   
      -        
           - 
   '  .   localedata 
    intl  C .

     localedata ( )   .

      :



























  ______________________________________________________________________
  #include <stdio.h>
  #include <time.h>
  #include <locale.h>

  main ()
  {
          struct tm *tp;
          char buf[80];
          time_t date;

  /*   locale      LANG  LANGUAGE
   *       el (ISO639) */
          setlocale (LC_TIME, ""); /*      */

          printf( "The time is: " );

          time(&date);

  /*           */
          tp = localtime(&date);
          strftime(buf, sizeof buf, "%a %b %e %H:%M:%S %z %Y", tp);

  /*    */
          printf ("%s\n",buf);

  }
  ______________________________________________________________________



        :    11 22:44:29 +0200 1998 
     ( LANG=el  gr   
  glibc2).  '   ctime     strftime().


           
  /usr/share/locale/el    .   
     localedata -    libc
     tarball    ftp://argeas.cs-
  net.gr/pub/unix/linux/GREEK/locale.glibc2.el.tar.gz <ftp://argeas.cs-
  net.gr/pub/unix/linux/GREEK/locale.glibc2.el.tar.gz>


      ,      
   NLS    :




















  ______________________________________________________________________
  #include <stdio.h>
  #include <time.h>
  #include <locale.h>
  #include <libintl.h> /*   GNU libc */

  main ()
  {
          struct tm *tp;
          char buf[80];
          time_t date;

  /*    LC_ALL   LC_TIME, LC_MESSAGES ,  
   *  '    .
   */
          setlocale (LC_ALL, "");

          bindtextdomain ("my_time", "/usr/share/locale");
          textdomain ("my_time");

          printf( gettext("The time is: ") );

          time(&date);
          tp = localtime(&date);
          strftime(buf, sizeof buf, "%a %b %e %H:%M:%S %z %Y", tp);

          printf ("%s\n",buf);

  }
  ______________________________________________________________________



    bindtextdomain()  textdomain()   nls
   (libintl)       
     my_time.mo  
  /usr/share/locale/XX,       (  
   LANG  LANGUAGE).

        gettext(...)   
   ,  :

  ______________________________________________________________________
          #define _(Text) gettext(Text) /*   */

          printf( _("The time is: ") );
  ______________________________________________________________________


         .  
     .po .        
   xgettext (   GNU gettext).

         xgettext : (
  "xgettext my_time.c")











  ______________________________________________________________________
  # messages.po
  # SOME DESCRIPTIVE TITLE.
  # Copyright (C) YEAR Free Software Foundation, Inc.
  # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
  #
  #, fuzzy
  msgid ""
  msgstr ""
  "Project-Id-Version: PACKAGE VERSION\n"
  "POT-Creation-Date: 1998-11-11 22:52+0200\n"
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
  "Language-Team: LANGUAGE <LL@li.org>\n"
  "MIME-Version: 1.0\n"
  "Content-Type: text/plain; charset=CHARSET\n"
  "Content-Transfer-Encoding: ENCODING\n"

  #: c.c:16
  msgid "The time is: "
  msgstr ""

  #end of messages.po
  ______________________________________________________________________


      messages.po  el.po,  
   msgstr  , :

  ______________________________________________________________________
  msgstr "  : "
  ______________________________________________________________________




           .po
    .mo  .gmo .      msgfmt
  (  GNU gettext ).

  ______________________________________________________________________
   msgfmt el.po -o el.gmo
  ______________________________________________________________________


       /usr/share/locale/el/LC_MESSAGES/  el.gmo
   my_time.mo (        
  makefile).


          .
      GNU autoconf.    configure.in
         nls   libc  
    strftime.  (    :
  http://teamball.sdsu.edu/doc/texi/gettext_toc.html
  <http://teamball.sdsu.edu/doc/texi/gettext_toc.html>)


           
    : (      /xxx) 
   /xxx/

  configure.in:    autoconf ( )
  config.h.in : ( )


    /xxx/src/

  my_time.c   :  



    /xxx/po/

  my_time.pot :     messages.po    
                 xgettext  
  el.po       :   my_time.pot   
  POTFILES.in :      .c   src  
                  gettext. :
                 /xxx/src/my_time.c



         gettext-0.10  po/Makefile.in
      /xxx/po/ ,    intl/ 
  /xxx/intl/   ABOUT-NLS, aclocal.m4  /xxx .


          (/xxx)  
    configure.in       (;) script
  configure.


  ______________________________________________________________________
  # configure.in for my_time.c
  AC_INIT()
  AC_CONFIG_HEADER(config.h)

  AC_PROG_CC
  AC_PATH_PROG(MAKE,make)
  AC_PROG_INSTALL

  VERSION=1.0
  PROGRAMS="my_time"

  AC_PREFIX_DEFAULT(/usr/local)
  AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
  AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
  AC_SUBST(PACKAGE)
  AC_SUBST(VERSION)
  AC_SUBST(PROGRAMS)

  dnl   ( el    iso639   
  dnl          
  dnl   gettext.)
  ALL_LINGUAS="el"

  dnl   gettext 0.10.
  ud_GNU_GETTEXT

  AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)

  AC_FUNC_STRFTIME

  AC_OUTPUT([Makefile src/Makefile intl/Makefile po/Makefile.in
  [sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile])

  #end of configure.in
  ______________________________________________________________________



       config.h.in (   
  config.h      .   
  config.h    script configure.)   config.h.in 
  :


  ______________________________________________________________________
  # config.h.in for my_time.c
  /*     (    textdomain) */
  #undef PACKAGE
  #undef VERSION

  /* strftime */
  #undef HAVE_STRFTIME
  #undef ENABLE_NLS

  #end of config.h.in
  ______________________________________________________________________




   Makefile.in    ( Makefile  
     configure),       :

  ______________________________________________________________________
  # Makefile.in
  CC      = @CC@
  LIBS    = @LIBS@
  CCOPTS  = @CFLAGS@ -I. -I..
  LN      = @LN_S@
  INSTALL = @INSTALL@
  prefix  = @prefix@
  exec_prefix  = @prefix@
  datadir = $(prefix)/lib
  bin     = $(prefix)/bin
  localedir = $(datadir)/locale
  DEFS    = -DLOCALEDIR=\"$(localedir)\"
  SUBDIRS = @INTLSUB@ src @POSUB@
  MAKE    = @MAKE@
  INSTALL = @INSTALL@

  #       src/    
  all:
          @for subdir in $(SUBDIRS); do \
                  echo making all in $$subdir; \
                  (cd $$subdir && $(MAKE) all) \
                  || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
          done && test -z "$$fail"

  install:
          @$(INSTALL) my_time $(bin)
          @$(MAKE) -C po/ install

  # end of makefile.in
  ______________________________________________________________________










  ______________________________________________________________________
  # src/Makefile.in
  #        :
  CC      = @CC@
  LIBS    = @LIBS@
  CCOPTS  = @CFLAGS@ -I../intl -I. -I..
  LN      = @LN_S@
  INSTALL = @INSTALL@
  prefix  = @prefix@
  exec_prefix  = @prefix@
  datadir = $(prefix)/lib
  localedir = $(datadir)/locale
  DEFS    = -DLOCALEDIR=\"$(localedir)\"

  all: my_time

  my_time: my_time.o
          $(CC) $(OBJECTS) -o ../my_time $(LIBDIRS) $(LIBS)

  my_time.o: my_time.c
          $(CC) -c my_time.c $(CCOPTS) $(DEFS)

  #end of src/Makefile.in
  ______________________________________________________________________



      :






































  ______________________________________________________________________
  # src/my_time.c

  #include <stdio.h>
  #include <time.h>
  #include <config.h> /*  "config.h"     -I.  Makefile */

  #ifdef ENABLE_NLS
  #include <libintl.h>
  #endif

  main ()
  {
  #ifdef HAVE_STRFTIME
          struct tm *tp;
          char buf[80];
          time_t date;
  #else
          time_t tv;
  #endif


  #ifdef ENABLE_NLS
          setlocale (LC_ALL, "");
          bindtextdomain (PACKAGE, LOCALEDIR);
          textdomain (PACKAGE);
  # define _(Text) gettext(Text)
  #else
  # define _(Text) (Text)
  #endif


          printf( _("The time is: ") );

  #ifdef HAVE_STRFTIME_H
          time(&date);
          tp = localtime(&date);
          strftime(buf, sizeof buf, "%a %b %e %H:%M:%S %z %Y", tp);
          printf ("%s\n",buf);
  #else
          time(&tv);
          printf ( "%s",ctime(&tv) );
  #endif

  }

  #end of src/my_time.c
  ______________________________________________________________________



     autoconf    configure script. A 
          !

          .   
    ,     
      autoconf, gettext.    
  gettext (      autoconf) :
  http://teamball.sdsu.edu/doc/texi/gettext_toc.html
  <http://teamball.sdsu.edu/doc/texi/gettext_toc.html>


  [1m4.    [0m



  [1m4.1.         ;[0m

     .       
       . ,    
     ,      ,
       .     
            
    .


  [1m4.2.  ,     NLS  ;[0m

        :


  ______________________________________________________________________
  ...
  /*        NLS */
  ...

  /* Second: Login with proper USER/PASS sequence.  */

  printf( _("connected!\n") );

  ...
  ______________________________________________________________________



          _( ).   
       ,   
      NLS      _() 
      .     .

  ,       
        _()   . 
            
  .  ,    ,   
            
  .   ,     
          .
    ,     .   
     ,    ,  
       .


  [1m4.3.           [0m
  [1m;[0m



  [1m4.3.1.   gettext[0m

            
   [1mgettext[22m,         GNU mirror sites.
   : [1m0.10.XX [22m       =35
   gettext-0.10.35.tar.gz
  <http://www.iro.umontreal.ca/contrib/po/gettext-0.10.35.tar.gz>


       NLS    [1mgettext[22m.
         , 
  [1mcatgets[22m.     [1mgettext[22m.



  [1m4.3.2.   xgettext[0m


  [1m: [22m *.c  *.h     _("blah blah").

  [1m:  [22m  *.pot     .

    *.pot    ,    
         el.po.   el.po
    .

        "gettext",   
  po/      ".pot",   
     . ,   
      *.po,  de.po, fr.po, nl.po 
        .pot  
   .


  [1m4.3.3.   msgfmt[0m


  [1m: [22m *.po (portable object)

  [1m:  [22m *.mo (machine object)


    .mo       
  /usr/share/locale/el/LC_MESSAGES     .


  [1m4.3.4.   [0m


      [1mgettext [22m


    msgmerge,    .po 

    msgcomm,     .po 

    msgcmp,   .po 

    msgunfmt,   .mo  .po


  [1m5.      [0m

          
  .     ,     
  ,  , ,     
  (..    A.S.Tanenbaum)  
  .



  [1m5.1.        .. "Broken pipe"; "[0m
  [1m";[0m

      ,     .  
         .   
         " ".




  [1m5.2.  LEXIS[0m

   LEXIS <http://server.hellug.gr/lexis/>    
        
  .


  [1m5.3.   [0m


        &  - 
      (  )

       (    .Tannembaum 
      ....;)( )

    ...( )


  [1m6.   [0m



  [1m6.1.   [0m

           

       

        

         

          
          (reviewing).
          
    .


  [1m6.2.   [0m

         ,  
           
   .    ,   
           .  
    ,       
      .    
         
  .


  [1m6.3.   [0m

            
     [1mpo/[22m[1m.pot [22m   .  
      



               msgid "Connecting to %s:%hu... "
               msgstr ""





  O    msgstr   , :


    msgid "Connecting to %s:%hu... "

    msgstr "[1m  %s:%hu... [22m"

        GNU Translation Project
  <http://www.iro.umontreal.ca/contrib/po>


  [1m6.4.   [0m

           
  GNU ,      
  .        DISCLAIMER
  <http://www.iro.umontreal.ca/contrib/po/doc/>.  
  ,   o    
   .  `` ''

       ,    
     


      <mailto:chanas@cs.teiath.gr>

      <mailto:nmav@i-net.paiko.gr>

      <mailto:kosmega@teiath.gr>

      <mailto:S.Xenitellis@rhbnc.ac.uk>

      <mailto:yspanos@hotmail.com>


  [1m6.5.          [0m
  [1m;[0m


  1.         Linux 
        .

  2.     Linux      
            .

  3.        .

  4.      Unix    
       Solaris.

  5.            
      Linux.     ,   
            (software house)   
              
       .

  6.     Linux  ,  
        .  ,    
     ,        .


  [1m7.     [0m


     GNU 

     1. enscript,   
        <mailto:lourakis@csd.uch.gr>,   
        <mailto:S.Xenitellis@rhbnc.ac.uk>

     2. fileutils,   
        <mailto:S.Xenitellis@rhbnc.ac.uk>,  [4m[0m

     3. gettext,   
        <mailto:S.Xenitellis@rhbnc.ac.uk>,  [4m[0m

     4. grep,   
        <mailto:S.Xenitellis@rhbnc.ac.uk>,  [4m[0m

     5. hello,   
        <mailto:S.Xenitellis@rhbnc.ac.uk>,  [4m[0m

     6. libc,    <mailto:nmav@hellug.gr>,
           <mailto:S.Xenitellis@rhbnc.ac.uk>

     7. m4,   
        <mailto:S.Xenitellis@rhbnc.ac.uk>,  [4m[0m

     8. recode,   
        <mailto:S.Xenitellis@rhbnc.ac.uk>,  [4m[0m

     9. sharutils,   
        <mailto:S.Xenitellis@rhbnc.ac.uk>,  [4m[0m

     10.
        sh-utils,   
        <mailto:nmav@hellug.gr>,  [4m[0m

     11.
        sed,   
        <mailto:S.Xenitellis@rhbnc.ac.uk>,  [4m[0m

     12.
        textutils,   
        <mailto:S.Xenitellis@rhbnc.ac.uk>,  [4m[0m

     13.
        wget,   
        <mailto:S.Xenitellis@rhbnc.ac.uk>,  [4m[0m

         #1
     <http://www.iro.umontreal.ca/contrib/po/doc/matrix.texi>, 
      #2 <http://www.iro.umontreal.ca/contrib/po/trans/el/>



     GNU 

     1. mutt,    <mailto:ph04169@cc.uoi.gr>,
           <mailto:S.Xenitellis@rhbnc.ac.uk>

     2. shadow,   
        <mailto:nmav@hellug.gr>,  [4m[0m

     3. windowmaker,   
        <mailto:papanikos@usa.net>,  [4m[0m

     4. lyx,    <mailto:maglis@otenet.gr>,
         [4m[24m,    Lyx
        <http://users.otenet.gr/~maglis/lyx>


    KDE

     1.   KDE,   
        <mailto:theodore@eexi.gr>,  [4m[0m

         KDE
     <http://www.kde.org/i18n.html>




    Gnome

         Gnome
     <http://www.gnome.org/i18n/status.shtml>


  [1m8.  [0m


  [1m8.1.       [0m


  1.   RedHat, RedHat <http://www.redhat.com>

  2.   SuSE, SuSE <http://www.suse.com>

  3. Fortify, Fortify <http://www.fortify.net/localization.html>, 
        NLS

  4. freetype, FreeType font rendering engine <http://www.freetype.org>

  5. rpm, RPM, package manager <http://www.redhat.com>

  6. Squid, Squid 2 Cache Proxy Server <http://squid.nlanr.net>

  7. Console tools, Console-tools
     <http://www.multimania.com/ydirson/en/lct/l10n.html>



  [1m9.   [0m



      <mailto:maglis@otenet.gr>

      <mailto:nmav@i-net.paiko.gr>

      <mailto:S.Xenitellis@rhbnc.ac.uk>

         , 
     `` ''    /
   .


  [1m10.      Linux[0m


    RedHat Linux 5.2


     1. WindowMaker



    RedHat Linux 6.0


     1. WindowMaker

     2. fileutils

     3. grep

     4. KDE,  1.1

     5. libc


    OpenLinux 2.2


     1. fileutils,  4.0-b6

     2. KDE,  1.1


    SuSE Linux 6.2 ( )



  [1m11.  PO [0m




  1.  GNU 

      GNU 
     <http://www.iro.umontreal.ca/contrib/po/trans/el/>



  2.  GNU 



    Lyx, Lyx <http://users.otenet.gr/~maglis/lyx/elpo>

    Mutt, mutt, international version <http://www.mutt.org>

    Shadow suite, shadow-suite
     <http://linux.forthnet.gr/pub/linux/shadow>

    WindowMaker, WindowMaker
     <http://www.windowmaker.org/ftp/pub/beta/srcs/WindowMaker-0.60.0.tar.gz>



  3. KDE <http://www.kde.org/messages/el.messages>



  4. Gnome

     [4m[0m





  [1m12.  [0m


  [1m12.1.         ;[0m

        GNU  
       
  <mailto:S.Xenitellis@rhbnc.ac.uk> (S.Xenitellis@rhbnc.ac.uk). 
   ,  e-mail.

     GNU ,    
   .

      KDE,     . 
  <mailto:theodore@eexi.gr>.

      Gnome,     
  <mailto:S.Xenitellis@rhbnc.ac.uk>.   Gnome   
      .     
          .
            
    .












































