Hello everybody,

here is my first prototype for support of variable strings and especially
of plurals. There's still a lot to do but I wanted to share this to get
some feedback.

Things to consider already:
- not have eval in the function, but have the number of plurals as a
constant in the language file and a function (also in the language file)
which computes the correct plural form
- have the language file with the several plural versions in an array (as
it is now) is not very well backwards compatible. It's probably a better
idea to keep one string but split it according to a delimiter (to be
defined). This way, even language files which were not converted to the new
system will still work.

Looking forward to getting your inputs.

ricky_ds

<<attachment: plural.php>>

_______________________________________________
Glpi-dev mailing list
Glpi-dev@gna.org
https://mail.gna.org/listinfo/glpi-dev

Reply via email to