• Documentation
  • File formats
  • PHP

PHP

When you download a file of the following formats for use in a particular language, all empty translations in that language are replaced by translations in the source language. But when you download the file for translation in a language, it contains only the translations in that the language only. When you download the file for review in a language, it contains only the reviewed translations in that language.

PHP Arrays

  • File extension: .php
  • i18n type: PHP_ARRAY

Sample data:

<?php
$LANG = array(
    "january"   => "enero",
    "february"  => "febrero",
    "march"     => "marzo",
    "april"     => "abril",
    "may"       => "mayo",
    "june"      => "junio",
    "july"      => "julio",
    "august"    => "agosto",
    "september" => "septiembre",
    "october"   => "octubre",
    "november"  => "noviembre",
    "december"  => "diciembre"
);>

PHP Alternative Array

  • File extension: .php
  • i18n type: PHP_ALT_ARRAY

Sample data:

<?php

$LANG[&#39;_MONDAY&#39;] = "Monday";
$LANG["_TUESDAY"] = &#39;Tuesday&#39;;

/**This is a multiline
 * comment***/
$LANG["_WEDNESDAY"] = &#39;&#39;;

$LANG["_Thursday"] = "Thursday";

?>

PHP DEFINE statements

  • File extension: .php
  • i18n type: PHP_DEFINE

Sample data:

<?php
    DEFINE("january", "enero");
    DEFINE("february", "febrero");
    DEFINE("march", "marzo");
    DEFINE("april", "abril");
    DEFINE("may", "mayo");
    DEFINE("june", "junio");
    DEFINE("july", "julio");
    DEFINE("august", "agosto");
    DEFINE("september", "septiembre");
    DEFINE("october", "octubre");
    DEFINE("november", "noviembre");
    DEFINE("december", "diciembre");
?>