Open Chouby opened 3 years ago
I am trying to understand the difference compared to the actual implementation in WordPress but the readme and from the code I don't find anything useful. Taking as example also this that has object cache and use the php gettext module.
There are 2 different methods.
If you need to translate all the strings included in the file, then the first method is the best. If you need to translate only a few strings avalaible in the file, then the second method is best.
DynaMo currently implements only the second method. #1 explains some of the choices that I have made.
Taking as example also this that has object cache and use the php gettext module.
I am not sure to understand what you mean. However, since you mention object cache, I have plans to try to take profit of it. Although I am still experimenting with it, this will probably be a completely different implementation compared to the uncached version. As for PHP Gettext module, I have no experience with it and currently have no plans with it.
Thanks for the explanation, really worth it (as I am one of the contributor to https://core.trac.wordpress.org/ticket/17268). There is the gettext module natively by PHP since years so you don't need anymore to parse the binary file in PHP and this should improve the performances a lot. It is used by https://github.com/aucor/dynamic-mo-loader, the author of this library suggested to check this library so this is the reason why I am here.
This issue is a summary of ideas that could be implemented in the future if they are worth it.
Hash_Search
).$this->originals
and thus avoid testing the existence of plural forms to use onlystrcmp()
inBinary_Search
. See #8$this->originals
inHash_Search
?~ This seems to be useful for about 10% of the strings of the default domain.