ZCatalog operators name translation
Hi, is there any way to translate (into portuguese) ZCatalog operators? Something like: not --> não (or nao simply) and --> e not and --> e não (or e nao) regards, Rogério
The "any way" is to patch the sources of TextIndex.py :-) Andreas ----- Original Message ----- From: "Rogerio Atem de Carvalho" <ratem@censa.com.br> To: <zope@zope.org> Sent: Mittwoch, 1. August 2001 09:10 Subject: [Zope] ZCatalog operators name translation Hi, is there any way to translate (into portuguese) ZCatalog operators? Something like: not --> não (or nao simply) and --> e not and --> e não (or e nao) regards, Rogério
Hi, --On Mittwoch, 1. August 2001 10:09 -0500 Andreas Jung <andreas@andreas-jung.com> wrote:
The "any way" is to patch the sources of TextIndex.py :-) Andreas
May be its more clean and easy to do the replacement of the operators with an external method or the like before passing them to TextIndex ;-) Cheers Tino
----- Original Message ----- From: "Rogerio Atem de Carvalho" <ratem@censa.com.br> To: <zope@zope.org> Sent: Mittwoch, 1. August 2001 09:10 Subject: [Zope] ZCatalog operators name translation
Hi,
is there any way to translate (into portuguese) ZCatalog operators? Something like:
not --> não (or nao simply) and --> e not and --> e não (or e nao)
regards,
Rogério
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Hi,
The "any way" is to patch the sources of TextIndex.py :-) Andreas
May be its more clean and easy to do the replacement of the operators with an external method or the like before passing them to TextIndex
How can I do it "before passing them to TextIndex"? regards, Rogerio Atem
Hi, --On Donnerstag, 2. August 2001 09:58 -0300 Rogerio Atem de Carvalho <ratem@censa.com.br> wrote:
Hi,
The "any way" is to patch the sources of TextIndex.py :-) Andreas
May be its more clean and easy to do the replacement of the operators with an external method or the like before passing them to TextIndex
How can I do it "before passing them to TextIndex"?
With zcatalog you define an attribute to index it. Instead of indexing the attribute (may be a string with the text you want to index) you can also direct to a method which does some replacement first, zcatalog will then index the results of the method rather then the raw string. If I understand your problem right, it was not the text you want to change but the question to the catalog to retrieve values. This problem is even simpler resolved. You get the question as a string from your formular, take this before calling the search function and replace the brasilian "and" with the english "and" keyword :) Regards Tino
Hi,
With zcatalog you define an attribute to index it. Instead of indexing the attribute (may be a string with the text you want to index) you can also direct to a method which does some replacement first, zcatalog will then index the results of the method rather then the raw string.
If I understand your problem right, it was not the text you want to change but the question to the catalog to retrieve values. This problem is even simpler resolved. You get the question as a string from your formular, take this before calling the search function and replace the brasilian "and" with the english "and" keyword :)
Good hint! I did and it worked, thanks a lot! Rogerio Atem
participants (3)
-
Andreas Jung -
Rogerio Atem de Carvalho -
Tino Wildenhain