The 'Language' object has one method and one nested object. The method includes Search
and Object include Codes
- Importing Module
- Objects
- Methods
To set up this module to work , you have to import the module first.
import { Language } from "wikifox";
This Object contains all the codes with it's name, language and wikipedia name. It is just a constant and static Javascript object.
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
}
This method will let you filter through the above object, so that it makes easy to choose between the codes!
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' }
}