@@ -6,9 +6,12 @@ $.ig = $.ig || {};
66
77$ . extend ( $ . ig , {
88 apiViewer : function ( ) {
9+ var lang = $ ( "html" ) . attr ( "lang" ) ,
10+ strings = this . locale [ lang ] || this . locale . en ;
11+
912 $ ( ".api-explorer,.api-viewer" ) . addClass ( "api-ui" ) . wrap ( "<div class='api-container' />" ) ;
10- $ ( ".api-viewer" ) . before ( "<div class='api-viewer-header api-ui'>$$( API_Viewer) </div>" ) ;
11- $ ( ".api-explorer" ) . before ( "<div class='api-viewer-header api-ui'>$$( API_Explorer) </div>" ) ;
13+ $ ( ".api-viewer" ) . before ( "<div class='api-viewer-header api-ui'>" + strings . API_Viewer + " </div>") ;
14+ $ ( ".api-explorer" ) . before ( "<div class='api-viewer-header api-ui'>" + strings . API_Explorer + " </div>") ;
1215 $ ( ".api-explorer,.api-viewer" ) . show ( ) ;
1316 }
1417} ) ;
@@ -23,7 +26,7 @@ $.ig.apiViewer.prototype = {
2326 this . _prevCount = 1 ;
2427 $ ( _$select ) . prepend ( "<div id='firstRow' class='api-row'>" + content + "</div>" ) ;
2528 /* OK 7/1/2013 145828 - This causes an exception in the ui-min when it is in an IFrame (jsFiddle) */
26- try {
29+ try {
2730 $ ( "#firstRow" ) . show ( "blind" , 200 , function ( ) {
2831 $ ( this ) . animate ( { backgroundColor : "#FFFFFF" } , 500 , function ( ) {
2932 $ ( this ) . removeAttr ( "id" ) ;
@@ -43,5 +46,15 @@ $.ig.apiViewer.prototype = {
4346 }
4447
4548 this . _prevContent = content ;
49+ } ,
50+ locale : {
51+ en : {
52+ "API_Viewer" : "API Viewer" ,
53+ "API_Explorer" : "API Explorer"
54+ } ,
55+ ja : {
56+ "API_Viewer" : "API ビューアー" ,
57+ "API_Explorer" : "API エクスプローラー"
58+ }
4659 }
4760}
0 commit comments