PHP Ini file (ini)
PHP INI format uses the standard INI file format (.ini extension) for PHP localization. INI files store key-value pairs in sections, with a simple syntax that requires no PHP parsing overhead. While less common than PHP arrays for large applications, INI files are lightweight and easy to edit by hand.
INI files contain sections defined by square-bracket headers, with key-value pairs under each section. Values are unquoted strings by default but can be quoted to preserve whitespace or special characters. Section names create a namespace hierarchy. INI files do not support nesting beyond sections, making them best suited for smaller, flatter string collections.
Best practice: use sections to group related strings — one section per feature area. Keep INI locale files lightweight and avoid complex interpolation patterns, as the INI format has limited support for variable substitution compared to PHP Array or YAML. Run a CI script to compare sections and keys across locale files and catch missing translations. Language Monster supports PHP INI format for PHP projects that use it.
