How to implement a search on a multilingual site with gettext support?

I am creating a multilingual language using gettext. Since all text from other languages ​​is in compiled .mo files. How should I attack the site search function? Any help or direction point would be appreciated. Notice I haven't encoded the search enigine before ...

+4
source share
1 answer

As I understand it, you would like to provide a search for information that is stored in .mo files; text files of key-value pairs.

The problem is mapping the kv pair in a specific .mo to a specific URI. If you can do this, you can run a script that parses the .mo files and stores the phrases along with the corresponding URI (or other resource identifier) ​​in some kind of data store, such as Apache Solr or MySQL detabase (with an indexed FULLTEXT column).

Another option is to use the crawler for slurp and index all the pages of your site by keyword and language. Here is a list of open source scanners:

http://en.wikipedia.org/wiki/Web_crawler#Open-source_crawlers

All the best.

+3
source

All Articles