Questions tagged [php-gettext]

php-gettext is a library for emulating gettext (a widely used framework for internationalization) in PHP.

Gettext is a widely used framework for internationalization. The php-gettext library provides PHP functions to read MO files even when gettext is not compiled in or when appropriate locale is not present on the system.

81 questions
0
votes
2 answers

Should I cache gettext?

I have been using PHP's gettext extension for a while and I am satisfied with its capabilities. I was wondering if there was a point in writing a class that will cache the strings from the .mo file to a Memcached server, for example. Can I benefit…
thexpand
  • 641
  • 13
  • 28
0
votes
3 answers

Gettext working intermittently

I've managed to successfully enable internationalization and {% trans %} tag in twig using these lines: $language = "..."; $domain = "project"; putenv("LC_MESSAGES=$language"); setlocale(LC_MESSAGES, $language); bindtextdomain($domain, SITE_DIR .…
0
votes
1 answer

Identifying a standard gettext pot file

Within my php framework (CakePHP), is a i18n tool for generating POT files. The header of the file is generated like so: protected function _writeHeader() { $output = "# LANGUAGE translation of CakePHP Application\n"; $output .= "# Copyright…
Angel S. Moreno
  • 3,469
  • 3
  • 29
  • 40
0
votes
1 answer

find a string from text file in php

I have a textfile where i have written different lines. Each line contains different string values, seperated by a semicolon ; . I am trying to get the first and the second string from the lines, i however do not know how. Any solution? PHP - right…
DrWooolie
  • 7,637
  • 7
  • 20
  • 19
0
votes
2 answers

php-gettext don't work in production server. (Ubuntu)

I'm having problems with gettext in PHP; i have two servers, one local (in which I development) in Windows (with vs.php) and works find, and other in Amazon EC2 (Ubuntu 12.04 updated), this is the production server and in this server the same code…
0
votes
1 answer

php gettext and poedit - What would be faster using constructor or without

I store some attributes and their options in class Attributes. public static $ethnicity = array(0 => '-', 1 => 'Asian', 2 => 'Black / African descent', …
user1324762
  • 765
  • 4
  • 7
  • 24
1 2 3 4 5
6