What i18n includes
- Outputting text through translation functions (
__(), t()) rather than hardcoded strings
- Unicode (UTF-8) support throughout the stack
- Correct plural handling (
1 file / 2 files / 5 files)
- RTL (right-to-left) for Arabic, Hebrew
- Date/time, number, currency formats via
Intl API or locale-aware libraries
l10n in practice
// PHP — via ICU format (recommended)
$msg = (new MessageFormatter('en', '{count, plural,
one {# file}
other {# files}
}'))->format(['count' => $n]);
Common mistakes
- Concatenating translated strings (word order differs between languages)
- Ignoring plurality rules
- Hardcoding date formats like
d/m/Y