mirror of
https://github.com/processwire/processwire.git
synced 2025-08-24 15:23:11 +02:00
Add feature request processwire/processwire-issues#1757 which adds support for non-plural translations of 0 quantities in the _n('%d item', %d items', 0);
translation function. To use, translate the file wire/modules/LanguageSupport/LanguageTranslator.php and edi the "Is zero (0) plural or singular?" setting at the top.
This commit is contained in:
@@ -644,6 +644,7 @@ class LanguageTranslator extends Wire {
|
||||
$v = '';
|
||||
|
||||
switch(strtolower($str)) {
|
||||
case '0-plural': $v = $this->_('0-plural'); break; // Is zero (0) plural or singular? type=radios options=[0-plural:Plural,0-singular:Singular] // i.e. would language use "0 items" (plural) or "0 item" (singular)?
|
||||
case 'edit': $v = $this->_('Edit'); break;
|
||||
case 'delete': $v = $this->_('Delete'); break;
|
||||
case 'save': $v = $this->_('Save'); break;
|
||||
|
Reference in New Issue
Block a user