Skip to content

Latest commit

 

History

History
66 lines (44 loc) · 1.48 KB

languages.md

File metadata and controls

66 lines (44 loc) · 1.48 KB

Language

The 'Language' object has one method and one nested object. The method includes Search and Object include Codes

📃 TABLE OF CONTENT

🪣 Importing module

To set up this module to work , you have to import the module first.

import { Language } from "wikifox";

Objects and Methods

Codes

This Object contains all the codes with it's name, language and wikipedia name. It is just a constant and static Javascript object.

Exmaple
import { Languages } from "wikifox";

console.log(Language.Codes)

/* OUTPUT */

{ en: { name: 'English Wikipedia', language: 'English' },
  fr: { name: 'Wikipédia en français', language: 'French' },
  de: { name: 'Deutschsprachige Wikipedia', language: 'German' },
  es: { name: 'Wikipedia en español', language: 'Spanish' },
  ja: { name: 'ウィキペディア 日本語版', language: 'Japanese' }

  // ..360 more items
}

Search

This method will let you filter through the above object, so that it makes easy to choose between the codes!

Exmaple
import { Languages } from "wikifox";

Languages.Search("ml", (result) => {
	console.log(result);
});

/* OUTPUT */
{
  ml: { name: 'Malayalam Wikipedia', language: 'Malayalam' },
  eml: { name: 'Emilian-Romagnol Wikipedia', language: 'Emilian- Romagnol' }
}