* docs(i18n): add internationalization (i18n) guide * docs(cb-i18n): revamped to System.import the translation file
		
			
				
	
	
		
			40 lines
		
	
	
		
			1009 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			1009 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!DOCTYPE html>
 | |
| <!-- #docregion -->
 | |
| <html>
 | |
|   <head>
 | |
|     <title>Angular i18n example</title>
 | |
|     <meta charset="UTF-8">
 | |
|     <meta name="viewport" content="width=device-width, initial-scale=1">
 | |
|     <link rel="stylesheet" href="styles.css">
 | |
| 
 | |
|     <script src="node_modules/core-js/client/shim.min.js"></script>
 | |
| 
 | |
|     <script src="node_modules/zone.js/dist/zone.js"></script>
 | |
|     <script src="node_modules/reflect-metadata/Reflect.js"></script>
 | |
|     <script src="node_modules/systemjs/dist/system.src.js"></script>
 | |
| 
 | |
|     <script src="systemjs.config.js"></script>
 | |
| 
 | |
|     <!-- #docregion i18n -->
 | |
|     <script>
 | |
|       // Get the locale id somehow
 | |
|       document.locale = 'fr';
 | |
| 
 | |
|       // Map to the text plugin
 | |
|       System.config({
 | |
|         map: {
 | |
|           text: 'systemjs-text-plugin.js'
 | |
|         }
 | |
|       });
 | |
| 
 | |
|       // Launch the app
 | |
|       System.import('app').catch(function(err){ console.error(err); });
 | |
|     </script>
 | |
|     <!-- #enddocregion i18n -->
 | |
|   </head>
 | |
| 
 | |
|   <body>
 | |
|     <my-app>Loading...</my-app>
 | |
|   </body>
 | |
| </html>
 |