Installing locales for strftime()

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Darko

    Installing locales for strftime()

    Hi,

    by definition, strftime() uses the previous setlocale() calls to
    determine which language to use in returning strings such as week days
    or month names, depending on the given format.

    Now, my system seems not to have the necessary packages installed,
    since I always get "Monday" and "March" etc. whichever language I
    specify. (No help needed for specifying languages, since gettext()
    works without problems, which means setlocale() went fine).

    I tried installing some packages from the Internet, but these are only
    for KDE language support, and they seem not to have impact on apache,
    php etc.

    My questions are:
    - what does this depend on - Apache configuration, PHP configuration,
    kernel configuration, some independent package installation?
    - where do I find these packages (I use slamd64 - Slackware AMD64)
    - how do I install these (if you help me find them, since google-ing
    until now didn't help much)

    If my configuration specification necessary, here it is:
    PHP: 5.2.0
    Apache: 2.2.4
    Kernel info: Linux 2.6.19.2 #2 SMP Wed Jan 17 17:49:26 CET 2007 x86_64
    GNU/Linux

    I need support for more than one language, eg. German, French,
    Serbian, Swedish, Russian, etc. No need for far-east languages at the
    moment.

    Thank you in advance, any idea?

    Darko

  • Roy Kaldung

    #2
    Re: Installing locales for strftime()

    Darko wrote:
    Hi,
    >
    by definition, strftime() uses the previous setlocale() calls to
    determine which language to use in returning strings such as week days
    or month names, depending on the given format.
    >
    Now, my system seems not to have the necessary packages installed,
    since I always get "Monday" and "March" etc. whichever language I
    specify. (No help needed for specifying languages, since gettext()
    works without problems, which means setlocale() went fine).
    >
    I tried installing some packages from the Internet, but these are only
    for KDE language support, and they seem not to have impact on apache,
    php etc.
    >
    My questions are:
    - what does this depend on - Apache configuration, PHP configuration,
    kernel configuration, some independent package installation?
    - where do I find these packages (I use slamd64 - Slackware AMD64)
    - how do I install these (if you help me find them, since google-ing
    until now didn't help much)
    >
    If my configuration specification necessary, here it is:
    PHP: 5.2.0
    Apache: 2.2.4
    Kernel info: Linux 2.6.19.2 #2 SMP Wed Jan 17 17:49:26 CET 2007 x86_64
    GNU/Linux
    >
    I need support for more than one language, eg. German, French,
    Serbian, Swedish, Russian, etc. No need for far-east languages at the
    moment.
    >
    Thank you in advance, any idea?
    Hi Darko,

    checkout setlocale() at the PHP manual. There is also an example.

    <http://de.php.net/manual/en/function.setloc ale.php>


    hth,
    Roy

    Comment

    • frugalprogrammer

      #3
      Re: Installing locales for strftime()

      On May 8, 4:00 am, Darko <darko.maksimo. ..@gmail.comwro te:
      Hi,
      >
      by definition, strftime() uses the previous setlocale() calls to
      determine which language to use in returning strings such as week days
      or month names, depending on the given format.
      >
      Now, my system seems not to have the necessary packages installed,
      since I always get "Monday" and "March" etc. whichever language I
      specify. (No help needed for specifying languages, since gettext()
      works without problems, which means setlocale() went fine).
      >
      I tried installing some packages from the Internet, but these are only
      for KDE language support, and they seem not to have impact on apache,
      php etc.
      >
      My questions are:
      - what does this depend on - Apache configuration, PHP configuration,
      kernel configuration, some independent package installation?
      - where do I find these packages (I use slamd64 - Slackware AMD64)
      - how do I install these (if you help me find them, since google-ing
      until now didn't help much)
      Also may want to to check out gettext:



      You have to compile in the GNU gettext lib, however:



      Cheers,
      Andrew
      >
      If my configuration specification necessary, here it is:
      PHP: 5.2.0
      Apache: 2.2.4
      Kernel info: Linux 2.6.19.2 #2 SMP Wed Jan 17 17:49:26 CET 2007 x86_64
      GNU/Linux
      >
      I need support for more than one language, eg. German, French,
      Serbian, Swedish, Russian, etc. No need for far-east languages at the
      moment.
      >
      Thank you in advance, any idea?
      >
      Darko

      Comment

      Working...