🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

l10n-helper

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

l10n-helper

simple small javascript library that will help you to translate your static web content.

latest
Source
npmnpm
Version
0.0.7
Version published
Maintainers
1
Created
Source

l10n-helper

simple small lightweight javascript library that will help you to translate your static web content.

Install

npm install --save l10n-helper

			or

bower install l10n-helper --save

Getting Started

			.
			.
			.

	<script type="text/javascript" src="l10n-helper.js"></script>
			
			.
			.
			.

<body>
	<p id="demo"></p>
	<p id="hello"></p>
	<p id="things"></p>


	<script type="text/javascript">
		l10n_register('es-ES', {
	    	'Hello': 'Hola',
	    });

	    l10n_register('es', {
	    	'Things': 'cosas'
	    });

	    l10n_register('ES', {
	    	'I love you': 'Te amo'
	    });

	    document.getElementById("demo").innerHTML = l10n('I love you');
		document.getElementById("hello").innerHTML = l10n('Hello');
		document.getElementById("things").innerHTML = l10n('Things');
	</script>
</body>


Supported Browsers

  • Firefox 2+
  • Opera 9+
  • Google Chrome 1+
  • Safari 4+

LICENSE

Copyright (C) 2016 Leonardo Esparis leo.leo.leoxnidas.c.14@gmail.com.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Contributor.

Leonardo Javier Esparis Meza

Version 0.0.7

- different browser language format fixed

Version 0.0.6

- adding the compressed version of l10n-helper.

Version 0.0.5

- Optimizing the search for translations.

Version 0.0.4

- developers can register multiple language formats.
- if words to translate does not exists at cache, those words will be returned.

Version 0.0.3

- firefox bug fixed, language format es-ES, different from chrome and opera.

Version 0.0.2

- Github location error fixed on package.json.

Version 0.0.1

- First commit.

Keywords

l10n

FAQs

Package last updated on 24 Jul 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts