Translate PHP .ini and .conf files

What are PHP .ini and .conf files?

PHP .ini and .conf are originally configuration files storing data as key/values which are used language files to localize PHP apps. Their file extension is .ini or .conf.

WebTranslateIt is a software localization platform that can help localize PHP .ini files.

PHP .ini or .conf file example

# Joomla! 1.5.10  2009-03-13
# author Swedish Translation Team
# Copyright (C) 2005 - 2009 Swedish Translation Team
# License http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL, see LICENSE.php
# Note : All ini files need to be saved as UTF-8 - No BOM

CACHE DIRECTORY="Cache-mapp"
CHANGELOG="Ändringslogg"
CLEAR RESULTS="Töm \" resultat"
CONFIGURATION FILE="Konfigurationsfil"
CONTROL PANEL="Kontrollpanel"
CREDITS="Erkännanden"
DATABASE COLLATION="Sorteringsordning"
DATABASE VERSION="Databasversion"

Linebreaks are valid in php .ini files. For instance:

STRING1="a multiline
string"
STRING2="another string"

Translations can be single-quoted, double-quoted and non-quoted, they can also be mixed within the same files and will be exported pristine. Note that it is not legit to have linebreaks in single-quoted strings, so line-breaks will be escaped.

STRING1='a multiline\nstring'
STRING2='another string'
STRING3='you can embed "double quotes" but single \' quotes have to be escaped'
STRING4="This one has double quotes"
STRING5=Look ma, no quotes!

Lines starting by a # will be imported as instructions.

STRING1='string'
# a  instruction for translator
STRING2='a string with a translator instruction'

Magic Comments

This file handler support the following magic comments:

  • Comments containing [MAXCHAR=xx] will set a max character limit to xx. Example: // [MAXCHAR=20]
  • Comments containing [LABEL=xxxx] will assign the label to xxxx. Example: // [LABEL=new feature]

Related File Formats

Related Platforms

PHP