Sha256: 8b5bad4b3bc61d8f4698de95a6a34d7fe661ac15d18332bddb95c4a9407bfe68

Contents?: true

Size: 864 Bytes

Versions: 7

Compression:

Stored size: 864 Bytes

Contents

Class: Locale.Set {#Locale-Set}
===============================

Extends *Locale.Set* (the class which Locale sets are an instance of) with a function to create locale sets from a JSON string. This locale set can then be used through [Locale.use][] to set as current locale.

Function: Locale.Set.from {#Locale-Set:Locale-Set-from}
-------------------------------------------------------

Returns a *Locale.Set* containing the language items described in the JSON string.

### Syntax

	Language.Set.from(str);

### Arguments

1. str - (*string*) a JSON string.

### Example

	var json = '{"name":"en-US","sets":{"FormValidator":{"required":"This field is required."}}}';
	var mySet = Locale.Set.from(json);
	Locale.use(mySet); // mySet is now the current locale

### Returns

* (*object*) A new *Locale.Set* instance.

[Locale.use]: /more/Locale/Locale#Locale:use

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
lsd_rails-0.1.6 Packages/mootools-more/Docs/Locale/Locale.Set.From.md
lsd_rails-0.1.5 Packages/mootools-more/Docs/Locale/Locale.Set.From.md
lsd_rails-0.1.4 Packages/mootools-more/Docs/Locale/Locale.Set.From.md
lsd_rails-0.1.3 Packages/mootools-more/Docs/Locale/Locale.Set.From.md
lsd_rails-0.1.2 Packages/mootools-more/Docs/Locale/Locale.Set.From.md
lsd_rails-0.1.1 Packages/mootools-more/Docs/Locale/Locale.Set.From.md
lsd_rails-0.1 Packages/mootools-more/Docs/Locale/Locale.Set.From.md