mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-11 14:53:15 +09:00
add multilingual API
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8991 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
5d79f510ce
commit
b54f869704
4 changed files with 67 additions and 6 deletions
|
|
@ -1391,12 +1391,27 @@
|
|||
function getLangListByLangcodeForAutoComplete() {
|
||||
$keyword = Context::get('search_keyword');
|
||||
|
||||
$list = array(
|
||||
array('name'=>'key1', 'value'=>'value1'),
|
||||
array('name'=>'key2', 'value'=>'value2'),
|
||||
array('name'=>'key3', 'value'=>'value3')
|
||||
);
|
||||
$requestVars = Context::getRequestVars();
|
||||
|
||||
$args->site_srl = (int)$requestVars->site_srl;
|
||||
$args->page = 1; // /< Page
|
||||
$args->list_count = 100; // /< the number of posts to display on a single page
|
||||
$args->page_count = 5; // /< the number of pages that appear in the page navigation
|
||||
$args->sort_index = 'name';
|
||||
$args->order_type = 'asc';
|
||||
$args->search_keyword = Context::get('search_keyword'); // /< keyword to search*/
|
||||
|
||||
$output = executeQueryArray('module.getLangListByLangcode', $args);
|
||||
|
||||
$list = array();
|
||||
|
||||
if($output->toBool()){
|
||||
foreach($output->data as $code_info){
|
||||
unset($codeInfo);
|
||||
$codeInfo = array('name'=>'$user_lang->'.$code_info->name, 'value'=>$code_info->value);
|
||||
$list[] = $codeInfo;
|
||||
}
|
||||
}
|
||||
$this->add('results', $list);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue