angular.js/i18n/e2e/localeTest_zh.html

44 lines
1.6 KiB
HTML
Raw Normal View History

<!document html>
2012-01-07 02:10:47 +00:00
<html ng-app>
2011-08-18 00:27:15 +00:00
<head>
<meta charset="utf-8">
<title>locale test</title>
2012-01-07 02:10:47 +00:00
<script src="../../build/angular.js"></script>
<script src="../../build/i18n/angular-locale_zh-cn.js"></script>
2011-09-08 20:56:29 +00:00
<script>
2012-03-28 18:16:10 +00:00
function AppCntl($scope){
$scope.input = 234234443432;
$scope.plInput = 1;
$scope.person1 = "Shanjian";
$scope.person2 = "Di";
$scope.plInput2 = 1;
2011-09-08 20:56:29 +00:00
}
</script>
</head>
2012-03-28 18:16:10 +00:00
<body ng-controller="AppCntl">
2011-08-18 00:27:15 +00:00
<h3>Datetime/Number/Currency filters demo:</h3>
2012-03-28 18:16:10 +00:00
<input type="text" ng-model="input"><br>
2011-08-18 00:27:15 +00:00
date(medium): {{input | date:"medium"}}<br>
date(longDate): {{input | date:"longDate"}}<br>
number: {{input | number}}<br>
currency: {{input | currency }}
2011-08-18 00:27:15 +00:00
<hr/>
<h3>Pluralization demo:</h3>
2012-03-28 18:16:10 +00:00
<input type="text" ng-model="plInput"><br>
<ng-pluralize count="plInput"
2011-08-18 00:27:15 +00:00
when= "{'other':'{}人在浏览该文件!'}">
2012-03-28 18:16:10 +00:00
</ng-pluralize>
2011-08-18 00:27:15 +00:00
<hr/>
<h3>Pluralization demo with offsets:</h3>
2012-03-28 18:16:10 +00:00
Name of person1:<input type="text" ng-model="person1"/><br/>
Name of person2:<input type="text" ng-model="person2"/><br/>
<input type="text" ng-model="plInput2"><br>
<ng-pluralize count="plInput2" offset=2
2011-08-18 00:27:15 +00:00
when= "{'0':'没有人在浏览该文件!',
'1': '{{person1}} 在浏览该文件!',
'2': '{{person1}} 和 {{person2}} 在浏览该文件!',
'other': '{{person1}}, {{person2}} 还有其他{} 人在浏览该文件!'}">
2012-03-28 18:16:10 +00:00
</ng-pluralize>
</body>
2011-08-18 00:27:15 +00:00
</html>