PHP Classes

File: tests/assert_templates/trans.php

Recommend this page to a friend!
  Classes of Cesar D. Rodas  >  Haanga  >  tests/assert_templates/trans.php  >  Download  
File: tests/assert_templates/trans.php
Role: Unit test script
Content type: text/plain
Description: Unit test script
Class: Haanga
Template engine to process Django style templates
Author: By
Last change: Fixed tests

+ Filter_Count had wrong class name
+ Using proper autoloader
+ Finally fixed issue with locales
Date: 3 years ago
Size: 345 bytes
 

Contents

Class file image Download
<?php
$data
= array('text' => 'hello');

if (!
is_callable('bindtextdomain')) {
    throw new
Exception('no gettext enabled');
}

$locale='en_US.utf8';
putenv("LC_ALL=$locale");
if (!
setlocale(LC_ALL, $locale)) {
    throw new
Exception('no gettext enabled');
}

bindtextdomain("messages", dirname(__FILE__) . "/locale");
textdomain("messages");

For more information send a message to info at phpclasses dot org.