Skip to content

Latest commit

 

History

History
39 lines (25 loc) · 1.44 KB

locales.md

File metadata and controls

39 lines (25 loc) · 1.44 KB

Adding locale

Create locale folder in src/providers

Add locale to locales list src/casual.js

Create specific providers inside of locale folder, it should have same name as base provider.

Locale-specific provider will be extended from base provider and will have all its properties.

Keep in mind that all provider methods will be bound to the casual object, so you can use other generators for your generator:

provider = {
	whoop_name: function() {
		return this.name + '!';
	}
}

module.exports = provider;

There are three things you can override/add:

  • dictionaries (leave formats and algorithms, just change dictionaries)
  • formats (leave dictionaries and algorithms, just change formats)
  • generators (change generator algorithm at all)

It should be pretty straightforward after looking at examples:

To view generator results you can use help util:

node utils/show.js internet -l ru_RU

For details see usage