CS 297, Spring - PowerPoint PPT Presentation

About This Presentation
Title:

CS 297, Spring

Description:

... 0.17gettext-toolsexampleshello-phppo');//'/www/htdocs/site.com/locale' ... here we are initializing the language variable. with the language 'bn' putenv ... – PowerPoint PPT presentation

Number of Views:11
Avg rating:3.0/5.0
Slides: 5
Provided by: JA66
Learn more at: http://www.cs.sjsu.edu
Category:
Tags: locale | spring

less

Transcript and Presenter's Notes

Title: CS 297, Spring


1
  • CS 297, Spring08
  • Prepared By
  • Farzana Forhad
  • Prepared For
  • Dr. Chris Pollett

2
gettext source code
  • lt?php
  • language 'bn'
  • putenv("LANGlanguage")
  • setlocale(LC_ALL, language)
  • domain 'messages'
  • bindtextdomain(domain, "\www\gettext-0.17\gettext
    -tools\examples\hello-php\po")//"/www/htdocs/site
    .com/locale")
  • textdomain(domain)
  • echo _("I stood in the wind")
  • ?gt

3
gettext source code
  • language 'bn'
  • here we are initializing the
    language variable
  • with the language bn
  • putenv("LANGlanguage")
  • the function putenv() sets an environmental
    variable
  • here. Put the value of language
    to LANG
  • setlocale(LC_ALL, language)
  • program must initialize for a specific
    language, and
  • setlcale serves the purpose

4
gettext source code
  • bindtextdomain(domain, "\www\gettext-0.17\gettext
    -tools\examples\hello-php\po")
  • the full pathname for the domain
    currently being set
  • textdomain ("hello-php")
  • the function returns the
    current message domain
Write a Comment
User Comments (0)
About PowerShow.com