Skip to content
This repository has been archived by the owner on Sep 23, 2020. It is now read-only.

Commit

Permalink
added minified version to be included in downloaded tarball; added so…
Browse files Browse the repository at this point in the history
…me tests
  • Loading branch information
flosse committed Feb 13, 2011
1 parent 7293f12 commit a050c9a
Show file tree
Hide file tree
Showing 6 changed files with 271 additions and 40 deletions.
7 changes: 4 additions & 3 deletions README.txt
@@ -1,9 +1,10 @@
# scaleApp
scaleApp is a tiny JavaScript framework for One-Page-Applications.
It is inspired by the talk of Nicholas C. Zakas — "Scalable JavaScript Application Architecture".
scaleApp is a tiny JavaScript framework for scalable One-Page-Applications.
It is inspired by the talk of Nicholas C. Zakas —
"Scalable JavaScript Application Architecture" (http://developer.yahoo.com/yui/theater/video.php?v=zakas-architecture).

Unlike his recommendations to abstract DOM manipulations and separating the framework from the base library,
scaleApp explicitly ueses jQuery as base library. Therefore you can use the full power of jQuery in every layer.
scaleApp explicitly ueses jQuery as base library. Therefore you can use the full power of jQuery on every layer.

scaleApp is licensed under the MIT license.

Expand Down
15 changes: 15 additions & 0 deletions build/scaleApp.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 29 additions & 13 deletions src/scaleApp.i18n.js
Expand Up @@ -9,19 +9,10 @@
* It is licensed under the MIT licence.
*/

/**
* Class: scaleApp.i18n
*/
scaleApp.i18n = (function( core ){

var lang = "en";

/**
* Function: getLanguage
*
* Returns:
* (String) the current language code, that is used globally
*/
var getLanguage = function(){
return lang;
}

/**
* Function: getBrowserLanguage
Expand All @@ -33,6 +24,21 @@ scaleApp.i18n = (function( core ){
return navigator.language || navigator.browserLanguage;
};

/**
* Holds the current global language code.
* By default the browsers language is used.
*/
var lang = getBrowserLanguage();

/**
* Function: getLanguage
*
* Returns:
* (String) the current language code, that is used globally.
*/
var getLanguage = function(){
return lang;
};

/**
* Function: setLanguage
Expand All @@ -52,9 +58,19 @@ scaleApp.i18n = (function( core ){
return false;
};

/**
* Function: _
*
* Parameters:
* (String) instanceId
* (String) textId
*
* Returns
* (String) the localized string.
*/
var _ = function( instanceId, textId ){
var inst = core.getInstance( instanceId );
core.log.debug(inst)

if( inst.opt ){
if( inst.opt.i18n ){
return inst.opt.i18n[ lang ][ textId ];
Expand Down

0 comments on commit a050c9a

Please sign in to comment.