SlideShare a Scribd company logo
1 of 13
That’s a nice UI, but have you internationalized your JavaScript Lovemore Nalube Developer University of Cape Town 17 June 2010
Overview Evil ‘n’ Good code Difficulties of i18n-sing JS Why Sakai's needs are unique RESTful access to a Sakai Message bundle DEMO: Course Evaluations and the SMS Credits Transfer tool 2 11th Sakai Conference - June 15-17, 2010
Sample nasty code Common evil case: Good case: var response = xhr.status; alert("You have an error caused by" + response); var response = xhr.status; alert(messageLocator.getString( “ui.site.error”, response); 3 11th Sakai Conference - June 15-17, 2010
Difficulties of i18n-sing JS Cannot rely on browser locale Most users are unaware of the presence of this browser setting JS alone cannot get Sakai Preferences locale setting Do we have to re-create message bundles? Inconsistencies, more effort, harder to maintain navigator.language /* Mozilla */|| navigator.userLanguage /* IE */  4 11th Sakai Conference - June 15-17, 2010
Why Sakai's needs are different 2 stages of language customization: User preference Server configuration Sakai’s own locale lookup is used in many tools Extend this ability to client side tools Date formats vary 5 11th Sakai Conference - June 15-17, 2010
Fun stuff Steps to follow 11th Sakai Conference - June 15-17, 2010 6
Step 1: RESTful access to a Sakai Message bundle Tool level Entity Provider creates a fixed URI for getting a message bundle In a webapp, make a provider class: ResourceLoader resourceLoader =  new ResourceLoader(MESSAGES_BUNDLE_DIR);  // eg. where  MESSAGES_BUNDLE_DIR =  	"org.sakaiproject.evaluation.tool.bundle.messages";              *** NEEDS TO BE A FOLDER! return the key-value equivalents of resourceLoader.entrySet().iterator(); in (for example) HashMap 7 11th Sakai Conference - June 15-17, 2010
Step 2: RESTful access to a Sakai Message bundle POM modifications creates a fixed URI for getting a message bundle Depend on Entity Broker: 8 11th Sakai Conference - June 15-17, 2010
Step 3: RESTful access to a Sakai Message bundle Call Ajax file at JS doc ready:        $.ajax({            url: “/direct/evals-resources/bundle.json”,            global: false,            cache: true,            dataType : "json",            success: function(messageBundleJSON){                messageBundle = messageBundleJSON.data;            }        });  9 11th Sakai Conference - June 15-17, 2010
Step 4: RESTful access to a Sakai Message bundle Start using: var removalString =  fluid.messageLocator( messageBundle )(["administrate.general.enable.response.removal"]);    *** For values with variable replacers like {0}   	as in removeitem.removed.user.message: "Item ({0}) has been removed", // Decoding the key "removeitem.removed.user.message".  //RESULT  removalString = "Item (3) has been removed" var removalString = 	fluid.messageLocator( messageBundle )(["removeitem.removed.user.message"], 3 ); 10 11th Sakai Conference - June 15-17, 2010
Step 4.5: RESTful access to a Sakai Message bundle Simpler way to use: Get a language string like this: //retrieve the message strings for key         messageLocator: function(key, params){             return fluid.messageLocator( messageBundle )([key], params);                     }, var alertError = evalTemplateUtils.messageLocator("evalsettings.email.sent.from", 	helpEmail.toLowerCase())); //if helpEmail.toLowerCase() = help@sakaiproject.org //prints: All emails will be sent from help@sakaiproject.org 11 11th Sakai Conference - June 15-17, 2010
Course Evaluations SMS Credits Transfer Demo 11th Sakai Conference - June 15-17, 2010 12
More info. http://blogs.uct.ac.za/blog/lovemores-world/2009/09/28/consuming-a-sakai-java-messages-resource-bundle-in-javascript-with-fluid-i8n SMS code: https://source.sakaiproject.org/contrib//sms/sms/trunk/user-tool/

More Related Content

Similar to That’s a nice UI, but have you internationalized your Javascript?

Jwebsocketmobiletechcon2010en 100912071225 Phpapp01
Jwebsocketmobiletechcon2010en 100912071225 Phpapp01Jwebsocketmobiletechcon2010en 100912071225 Phpapp01
Jwebsocketmobiletechcon2010en 100912071225 Phpapp01purans
 
MeasureCamp IX (London) - 10 JavaScript Concepts for web analysts
MeasureCamp IX (London) - 10 JavaScript Concepts for web analystsMeasureCamp IX (London) - 10 JavaScript Concepts for web analysts
MeasureCamp IX (London) - 10 JavaScript Concepts for web analystsSimo Ahava
 
Jakarta EE and MicroProfile Tech Talk
Jakarta EE and MicroProfile Tech TalkJakarta EE and MicroProfile Tech Talk
Jakarta EE and MicroProfile Tech TalkJosh Juneau
 
Bytecode manipulation with Javassist and ASM
Bytecode manipulation with Javassist and ASMBytecode manipulation with Javassist and ASM
Bytecode manipulation with Javassist and ASMashleypuls
 
Java Technology
Java TechnologyJava Technology
Java Technologyifnu bima
 
CTS Conference Web 2.0 Tutorial Part 2
CTS Conference Web 2.0 Tutorial Part 2CTS Conference Web 2.0 Tutorial Part 2
CTS Conference Web 2.0 Tutorial Part 2Geoffrey Fox
 
Using OSGi in Nakamura
Using OSGi in NakamuraUsing OSGi in Nakamura
Using OSGi in NakamuraCarl Hall
 
Using Sakai with Multiple Locales
Using Sakai with Multiple LocalesUsing Sakai with Multiple Locales
Using Sakai with Multiple Localesballsy333
 
Mobile Device APIs
Mobile Device APIsMobile Device APIs
Mobile Device APIsJames Pearce
 
OSGi Community Event 2010 - Enterprise OSGi in WebSphere and Apache Aries
OSGi Community Event 2010 - Enterprise OSGi in WebSphere and Apache AriesOSGi Community Event 2010 - Enterprise OSGi in WebSphere and Apache Aries
OSGi Community Event 2010 - Enterprise OSGi in WebSphere and Apache Ariesmfrancis
 
BarCamp KL H20 Open Social Hackathon
BarCamp KL H20 Open Social HackathonBarCamp KL H20 Open Social Hackathon
BarCamp KL H20 Open Social Hackathonmarvin337
 
Implementing Web Services In Java
Implementing Web Services In JavaImplementing Web Services In Java
Implementing Web Services In JavaEdureka!
 
Java EE 7: Boosting Productivity and Embracing HTML5
Java EE 7: Boosting Productivity and Embracing HTML5Java EE 7: Boosting Productivity and Embracing HTML5
Java EE 7: Boosting Productivity and Embracing HTML5Arun Gupta
 
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...jaxLondonConference
 
Timings API: Performance Assertion during the functional testing
 Timings API: Performance Assertion during the functional testing Timings API: Performance Assertion during the functional testing
Timings API: Performance Assertion during the functional testingPetrosPlakogiannis
 
Easing offline web application development with GWT
Easing offline web application development with GWTEasing offline web application development with GWT
Easing offline web application development with GWTArnaud Tournier
 
Micronaut Http Client
Micronaut Http ClientMicronaut Http Client
Micronaut Http ClientJames Kleeh
 
EJB et WS (Montreal JUG - 12 mai 2011)
EJB et WS (Montreal JUG - 12 mai 2011)EJB et WS (Montreal JUG - 12 mai 2011)
EJB et WS (Montreal JUG - 12 mai 2011)Montreal JUG
 
From Ruby to Node.js
From Ruby to Node.jsFrom Ruby to Node.js
From Ruby to Node.jsjubilem
 

Similar to That’s a nice UI, but have you internationalized your Javascript? (20)

jWebSocket MobileTechCon 2010 - WebSockets on Android, Symbian and BlackBerry
jWebSocket MobileTechCon 2010 - WebSockets on Android, Symbian and BlackBerryjWebSocket MobileTechCon 2010 - WebSockets on Android, Symbian and BlackBerry
jWebSocket MobileTechCon 2010 - WebSockets on Android, Symbian and BlackBerry
 
Jwebsocketmobiletechcon2010en 100912071225 Phpapp01
Jwebsocketmobiletechcon2010en 100912071225 Phpapp01Jwebsocketmobiletechcon2010en 100912071225 Phpapp01
Jwebsocketmobiletechcon2010en 100912071225 Phpapp01
 
MeasureCamp IX (London) - 10 JavaScript Concepts for web analysts
MeasureCamp IX (London) - 10 JavaScript Concepts for web analystsMeasureCamp IX (London) - 10 JavaScript Concepts for web analysts
MeasureCamp IX (London) - 10 JavaScript Concepts for web analysts
 
Jakarta EE and MicroProfile Tech Talk
Jakarta EE and MicroProfile Tech TalkJakarta EE and MicroProfile Tech Talk
Jakarta EE and MicroProfile Tech Talk
 
Bytecode manipulation with Javassist and ASM
Bytecode manipulation with Javassist and ASMBytecode manipulation with Javassist and ASM
Bytecode manipulation with Javassist and ASM
 
Java Technology
Java TechnologyJava Technology
Java Technology
 
CTS Conference Web 2.0 Tutorial Part 2
CTS Conference Web 2.0 Tutorial Part 2CTS Conference Web 2.0 Tutorial Part 2
CTS Conference Web 2.0 Tutorial Part 2
 
Using OSGi in Nakamura
Using OSGi in NakamuraUsing OSGi in Nakamura
Using OSGi in Nakamura
 
Using Sakai with Multiple Locales
Using Sakai with Multiple LocalesUsing Sakai with Multiple Locales
Using Sakai with Multiple Locales
 
Mobile Device APIs
Mobile Device APIsMobile Device APIs
Mobile Device APIs
 
OSGi Community Event 2010 - Enterprise OSGi in WebSphere and Apache Aries
OSGi Community Event 2010 - Enterprise OSGi in WebSphere and Apache AriesOSGi Community Event 2010 - Enterprise OSGi in WebSphere and Apache Aries
OSGi Community Event 2010 - Enterprise OSGi in WebSphere and Apache Aries
 
BarCamp KL H20 Open Social Hackathon
BarCamp KL H20 Open Social HackathonBarCamp KL H20 Open Social Hackathon
BarCamp KL H20 Open Social Hackathon
 
Implementing Web Services In Java
Implementing Web Services In JavaImplementing Web Services In Java
Implementing Web Services In Java
 
Java EE 7: Boosting Productivity and Embracing HTML5
Java EE 7: Boosting Productivity and Embracing HTML5Java EE 7: Boosting Productivity and Embracing HTML5
Java EE 7: Boosting Productivity and Embracing HTML5
 
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
 
Timings API: Performance Assertion during the functional testing
 Timings API: Performance Assertion during the functional testing Timings API: Performance Assertion during the functional testing
Timings API: Performance Assertion during the functional testing
 
Easing offline web application development with GWT
Easing offline web application development with GWTEasing offline web application development with GWT
Easing offline web application development with GWT
 
Micronaut Http Client
Micronaut Http ClientMicronaut Http Client
Micronaut Http Client
 
EJB et WS (Montreal JUG - 12 mai 2011)
EJB et WS (Montreal JUG - 12 mai 2011)EJB et WS (Montreal JUG - 12 mai 2011)
EJB et WS (Montreal JUG - 12 mai 2011)
 
From Ruby to Node.js
From Ruby to Node.jsFrom Ruby to Node.js
From Ruby to Node.js
 

Recently uploaded

Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 

Recently uploaded (20)

Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 

That’s a nice UI, but have you internationalized your Javascript?

  • 1. That’s a nice UI, but have you internationalized your JavaScript Lovemore Nalube Developer University of Cape Town 17 June 2010
  • 2. Overview Evil ‘n’ Good code Difficulties of i18n-sing JS Why Sakai's needs are unique RESTful access to a Sakai Message bundle DEMO: Course Evaluations and the SMS Credits Transfer tool 2 11th Sakai Conference - June 15-17, 2010
  • 3. Sample nasty code Common evil case: Good case: var response = xhr.status; alert("You have an error caused by" + response); var response = xhr.status; alert(messageLocator.getString( “ui.site.error”, response); 3 11th Sakai Conference - June 15-17, 2010
  • 4. Difficulties of i18n-sing JS Cannot rely on browser locale Most users are unaware of the presence of this browser setting JS alone cannot get Sakai Preferences locale setting Do we have to re-create message bundles? Inconsistencies, more effort, harder to maintain navigator.language /* Mozilla */|| navigator.userLanguage /* IE */  4 11th Sakai Conference - June 15-17, 2010
  • 5. Why Sakai's needs are different 2 stages of language customization: User preference Server configuration Sakai’s own locale lookup is used in many tools Extend this ability to client side tools Date formats vary 5 11th Sakai Conference - June 15-17, 2010
  • 6. Fun stuff Steps to follow 11th Sakai Conference - June 15-17, 2010 6
  • 7. Step 1: RESTful access to a Sakai Message bundle Tool level Entity Provider creates a fixed URI for getting a message bundle In a webapp, make a provider class: ResourceLoader resourceLoader = new ResourceLoader(MESSAGES_BUNDLE_DIR); // eg. where  MESSAGES_BUNDLE_DIR = "org.sakaiproject.evaluation.tool.bundle.messages";             *** NEEDS TO BE A FOLDER! return the key-value equivalents of resourceLoader.entrySet().iterator(); in (for example) HashMap 7 11th Sakai Conference - June 15-17, 2010
  • 8. Step 2: RESTful access to a Sakai Message bundle POM modifications creates a fixed URI for getting a message bundle Depend on Entity Broker: 8 11th Sakai Conference - June 15-17, 2010
  • 9. Step 3: RESTful access to a Sakai Message bundle Call Ajax file at JS doc ready:        $.ajax({            url: “/direct/evals-resources/bundle.json”,            global: false,            cache: true,            dataType : "json",            success: function(messageBundleJSON){                messageBundle = messageBundleJSON.data;            }        }); 9 11th Sakai Conference - June 15-17, 2010
  • 10. Step 4: RESTful access to a Sakai Message bundle Start using: var removalString = fluid.messageLocator( messageBundle )(["administrate.general.enable.response.removal"]);   *** For values with variable replacers like {0}  as in removeitem.removed.user.message: "Item ({0}) has been removed", // Decoding the key "removeitem.removed.user.message". //RESULT  removalString = "Item (3) has been removed" var removalString = fluid.messageLocator( messageBundle )(["removeitem.removed.user.message"], 3 ); 10 11th Sakai Conference - June 15-17, 2010
  • 11. Step 4.5: RESTful access to a Sakai Message bundle Simpler way to use: Get a language string like this: //retrieve the message strings for key messageLocator: function(key, params){ return fluid.messageLocator( messageBundle )([key], params); }, var alertError = evalTemplateUtils.messageLocator("evalsettings.email.sent.from", helpEmail.toLowerCase())); //if helpEmail.toLowerCase() = help@sakaiproject.org //prints: All emails will be sent from help@sakaiproject.org 11 11th Sakai Conference - June 15-17, 2010
  • 12. Course Evaluations SMS Credits Transfer Demo 11th Sakai Conference - June 15-17, 2010 12