hi, I'm not shure if this ever suggested.
While build up a two language offline site for CD with javaScript Search, I needed for both languages (german and english) 2 searchforms.
Due I can only choose one zlang file from the indexer, it's not possible to set more languages.
Here is the trick (excuse me if that is not new):
1. setup a search with english language (or any other) and generate all necessary files (search index and all the other js files)
2. setup a second indexing with the other language at example choose the german zlang file and generate the searchfile BUT choose another location and dont overwrite the first index/searchfiles!!!!
3. the translation variables are stored into search_index.js at the end of file. so copy out this part of the second generated search_index.js file.
it looks like this:
copy all that variables to a new js file called search_d.js and include it on the german (or any other second language) part of your website with
right after the other included search related js files.
so the language vars from the included search_index.js which holds the english language vars, will be overwritten by the new included search_d.js, which holds the same variables with german content.
ACHTUNG! search results will be listed for both languages if there is no category for each language set up!
just the search form is different!
hope you can follow this description, my english is not so good.
I did not try the asp/php/cgi based search, maybe there is a similar way.
I did not choose the way to build my own search form and suspress the zoom generated form, because the resultpage contain no search form anymore.
maybe it is possible for further versions, to generate separate and different translation files, to include them as needed.
Zoom search is really good!
best
marcus
While build up a two language offline site for CD with javaScript Search, I needed for both languages (german and english) 2 searchforms.
Due I can only choose one zlang file from the indexer, it's not possible to set more languages.
Here is the trick (excuse me if that is not new):
1. setup a search with english language (or any other) and generate all necessary files (search index and all the other js files)
2. setup a second indexing with the other language at example choose the german zlang file and generate the searchfile BUT choose another location and dont overwrite the first index/searchfiles!!!!
3. the translation variables are stored into search_index.js at the end of file. so copy out this part of the second generated search_index.js file.
it looks like this:
Code:
var STR_FORM_SEARCHFOR = "Suche nach:"; var STR_FORM_SUBMIT_BUTTON = "Abschicken"; var STR_FORM_RESULTS_PER_PAGE = "Ergebnisse je Seite:"; ...
Code:
<script language="JavaScript" src="search_d.js"></script>
so the language vars from the included search_index.js which holds the english language vars, will be overwritten by the new included search_d.js, which holds the same variables with german content.
ACHTUNG! search results will be listed for both languages if there is no category for each language set up!
just the search form is different!
hope you can follow this description, my english is not so good.
I did not try the asp/php/cgi based search, maybe there is a similar way.
I did not choose the way to build my own search form and suspress the zoom generated form, because the resultpage contain no search form anymore.
maybe it is possible for further versions, to generate separate and different translation files, to include them as needed.
Zoom search is really good!
best
marcus
Comment