PDA

View Full Version : [CLOSED] [#248] ext:DateField language problem



hdsoso
May 23, 2013, 8:47 AM
ext:DateField lunguage is always English , how to set other language, such as Chinese?


<ext:DateField ID="DateField1" Format="yyyy-MM-dd" runat="server" InputWidth="90" LabelWidth="35"></ext:DateField>

Daniil
May 23, 2013, 9:41 AM
Hi @hdsoso,

You can localize an entire page setting a ResourceManager's Locale property.

<ext:ResourceManager runat="server" Locale="zh-CN" />

It makes the big localization job. Though you might need to correct something.

Or you can always use a DateField's properties to localize a specific component.

hdsoso
May 24, 2013, 1:20 AM
Hi @hdsoso,

You can localize an entire page setting a ResourceManager's Locale property.

<ext:ResourceManager runat="server" Locale="zh-CN" />

It makes the big localization job. Though you might need to correct something.

Or you can always use a DateField's properties to localize a specific component.

I have a try


<ext:ResourceManager runat="server" Locale="zh-CN" ></ext:ResourceManager>

or


<ext:DateField ID="DateField1" Locale="zh-CN" Format="yyyy-MM-dd" runat="server" InputWidth="90" LabelWidth="35"></ext:DateField>

but the week language is also English
6262

Daniil
May 24, 2013, 4:37 AM
I think this bug is reported here.
http://www.sencha.com/forum/showthread.php?262900

You can override it. Please see the script in the page's <head>.

Example

<%@ Page Language="C#" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<!DOCTYPE html>
<html>
<head runat="server">
<title>Ext.NET v2 Example</title>

<script>
Ext.onReady(function () {
Ext.Date.dayNames = [ '1', '2', '3', '4', '5', '6', '7' ]; // specify the correct text here

Ext.picker.Date.override({
dayNames: Ext.Date.dayNames
});
});
</script>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" Locale="zh-CN" />

<ext:DatePicker runat="server" />
<ext:DateField runat="server" />
</form>
</body>
</html>


Created an Issue to track this defect.
https://github.com/extnet/Ext.NET/issues/248

Daniil
May 30, 2013, 10:12 AM
It has been fixed in SVN and will go to the next release (v2.2.1 or v2.3).