issue 160, added support multi language for widget

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9161 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
flyskyko 2011-09-15 09:06:19 +00:00
parent c776afd76e
commit db57e428cc
7 changed files with 71 additions and 8 deletions

View file

@ -3761,6 +3761,10 @@ Xin vui lòng kiểm tra lại thông tin Database.]]></value>
</item>
<item name="cmd_no">
<value xml:lang="ko"><![CDATA[아니오]]></value>
</item>
<item name="multilingual">
<value xml:lang="ko"><![CDATA[다국어]]></value>
<value xml:lang="en"><![CDATA[Multilingual]]></value>
</item>
<item name="cmd_set_multilingual">
<value xml:lang="ko"><![CDATA[다국어 설정]]></value>

View file

@ -977,8 +977,4 @@ Lütfen son sürümü için indirme linkine tıklayınız.]]></value>
<value xml:lang="ko"><![CDATA[관리자 메뉴 추가]]></value>
<value xml:lang="en"><![CDATA[Admin Menu Add]]></value>
</item>
<item name="multilingual">
<value xml:lang="ko"><![CDATA[다국어]]></value>
<value xml:lang="en"><![CDATA[Multilingual]]></value>
</item>
</lang>

View file

@ -20,4 +20,6 @@
<h3 class="h3">{$lang->widget_code}</h3>
<p><textarea id="widget_code" style="width: 100%; height: 50px;" readonly="readonly"></textarea>
<include target="widget_generate_code.filebox.html" />
<include target="widget_generate_code.filebox.html" />
<include target="widget_generate_code.multilang.html" />
<include target="widget_generate_code.multilang.textarea.html" />

View file

@ -42,9 +42,19 @@
<li class="modulefinder"|cond="$var->type == 'mid' || $var->type == 'module_srl_list'">
<p class="q"><label for="{$id}">{$var->name}</label></p>
<div class="a">
<input cond="$var->type == 'text'" type="text" name="{$id}" value="" id="{$id}" />
<div cond="$var->type == 'text'" class="multiLangEdit">
{@$use_multilang = true}
<input type="hidden" name="{$id}" value="" class="vLang" />
<input type="text" id="{$id}" class="vLang" />
<span class="desc"><a href="#langEdit" class="editUserLang tgAnchor">{$lang->cmd_set_multilingual}</a></span>
</div>
<input cond="$var->type == 'color'" type="text" name="{$id}" value="" id="{$id}" class="color-indicator" />
<textarea cond="$var->type == 'textarea'" name="{$id}" id="{$id}"></textarea>
<div cond="$var->type == 'textarea'" class="multiLangEdit">
{@$use_multilang_textarea = true}
<input type="hidden" name="{$id}" value="" class="vLang" />
<textarea cond="$var->type == 'textarea'" id="{$id}" class="vLang"></textarea>
<span class="desc"><a href="#langEditTextarea" class="editUserLang tgAnchor">{$lang->cmd_set_multilingual}</a></span>
</div>
<select cond="$var->type == 'select'" name="{$id}" id="{$id}" style="width:290px">
<option loop="$var->options => $key, $val" value="{$key}">{$val}</option>
</select>

View file

@ -0,0 +1,23 @@
<block cond="$use_multilang">
<div id="langEdit" class="langEdit tgContent">
<ul class="langList"></ul>
<div id="langInput" class="form">
<h2>{$lang->multilingual} <strong>{$lang->cmd_modify}</strong> | <a href="#langEdit">{$lang->cmd_insert}</a></h2>
<ul>
{@
/* move current language to the top */
$a = array($lang_type=>$lang_supported[$lang_type]);
unset($lang_supported[$lang_type]);
$lang_supported = array_merge($a, $lang_supported);
}
<li loop="$lang_supported=>$code,$name" class="{$code}"><label for="{$code}_var1">{$name}</label> <input type="text" value="" id="{$code}_var1" /></li>
</ul>
<div class="action">
<div class="btnArea">
<span class="btn small"><input type="submit" value="{$lang->use}|{$lang->use_after_save}" /></span>
</div>
<p><a href="{getUrl('act','dispModuleAdminLangcode')}">다국어 텍스트 관리</a></p>
</div>
</div>
</div>
</block>

View file

@ -0,0 +1,27 @@
<block cond="$use_multilang_textarea">
<style type="text/css">
#langEditTextarea textarea { width: 258px; }
</style>
<div id="langEditTextarea" class="langEdit tgContent">
<ul class="langList"></ul>
<div id="langInput" class="form">
<h2>{$lang->multilingual} <strong>{$lang->cmd_modify}</strong> | <a href="#langEdit">{$lang->cmd_insert}</a></h2>
<ul>
{@
/* move current language to the top */
$a = array($lang_type=>$lang_supported[$lang_type]);
unset($lang_supported[$lang_type]);
$lang_supported = array_merge($a, $lang_supported);
}
<li loop="$lang_supported=>$code,$name" class="{$code}"><label for="{$code}_var1">{$name}</label> <textarea id="{$code}_var1"></textarea></li>
</ul>
<div class="action">
<div class="btnArea">
<span class="btn small"><input type="submit" value="{$lang->use}|{$lang->use_after_save}" /></span>
</div>
<p><a href="{getUrl('act','dispModuleAdminLangcode')}">다국어 텍스트 관리</a></p>
</div>
</div>
</div>
</block>

View file

@ -35,5 +35,6 @@
</form>
<include target="widget_generate_code.filebox.html" />
<include target="widget_generate_code.multilang.html" />
<include target="widget_generate_code.multilang.textarea.html" />
</div>