1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00
fab-manager/vendor/assets/components/messageformat/example/index.html
2016-03-23 18:39:41 +01:00

29 lines
1.0 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script>document.write('<script src="' + (localStorage.getItem('lang') || 'en') + '/i18n.js"><\/script>')</script>
</head>
<body>
<div id="content">
</div>
<input type="button" value="en" name="en" />
<input type="button" value="fr" name="fr" />
<script>
$('<div>').text(window.i18n['colors'].red()).appendTo('#content');
$('<div>').text(window.i18n['colors'].blue()).appendTo('#content');
$('<div>').text(window.i18n['colors'].green()).appendTo('#content');
$('<div>').text(window.i18n['sub/folder/plural'].test({NUM: 1})).appendTo('#content');
$('<div>').text(window.i18n['sub/folder/plural'].test({NUM: 2})).appendTo('#content');
$('input').click(function(e){
e.preventDefault();
var $target = $(e.target);
var lang = $target.attr('name');
localStorage.setItem('lang', lang);
location.reload();
});
</script>
</body>
</html>