INI
.ini
files are commonly used in applications on various platforms. There is no standard for .ini
files and the applications can vary in their use of
- key-value delimiters
- comment masks
- comment positions
- section nesting
- support for a blank line
So, Lingohub has applied the following rules for.ini
files, which should match common variations.
Format
- Key-value pairs are delimited with the equal character
=
or colon:
and terminated by a new line. - Values can not be spread to multiple lines.
- Section declarations can have this form:
[section]
. - All keys after the section declaration are associated with that section.
- There is no explicit “end of section” delimiter, and sections end at the end of the next section declaration or the end of the file.
- Sections can not be nested.
- The segment key will be a combination of the section and segment keys, and this combination must be unique
- Placeholders are not supported because there is no standardized format. This means Lingohub cannot detect placeholders and cannot provide quality check support.
However, please contact our support to define a placeholder syntax. - Comment lines can start with a hash sign
#
or semicolon;
; everything up to the end of the line is treated as a comment. - A comment is assigned to the next key-value pair unless there are any blank lines or section declarations in between.
Examples
Additional example files can be accessed here.
; this comment is ignored because it is not directly followed by a key-value pair
; this comment will be stored along with the section information
[section1]
; comments in .ini files can start with hash
hello_user = Hello stranger!
[section2]
; this key belongs to section2 and no longer to section1
welcome_message = Welcome back, we have missed you
; multi line comments belong to the next key value pair
; as long as they are not interrupted by a white line
visit_count = this is your millionth visit to our site
References
Updated 3 days ago