ข้ามไปเนื้อหา

มอดูล:languages/documentation

จาก วิกิพจนานุกรม พจนานุกรมเสรี

นี่คือหน้าเอกสารการใช้งานสำหรับ มอดูล:languages

This module is used to retrieve and manage the languages that can have Wiktionary entries, and the information associated with them. See Wiktionary:Languages for more information.

For the languages and language varieties that may be used in etymologies, see Module:etymology languages. For language families, which sometimes also appear in etymologies, see Module:families.

This module provides access to other modules. To access the information from within a template, see Module:languages/templates.

The information itself is stored in the various data modules that are subpages of this module. These modules should not be used directly by any other module, the data should only be accessed through the functions provided by this module.

Data submodules:

Extra data submodules (for less frequently used data):

Finding and retrieving languages

[แก้ไข]

The module exports a number of functions that are used to find languages.

แม่แบบ:module documentation

Language objects

[แก้ไข]

A Language object is returned from one of the functions above. It is a Lua representation of a language and the data associated with it. It has a number of methods that can be called on it, using the : syntax. For example:

local m_languages = require("Module:languages")
local lang = m_languages.getByCode("fr")
local name = lang:getCanonicalName()
-- "name" will now be "French"

แม่แบบ:module documentation

Error function

[แก้ไข]

See Module:languages/error.

Subpages

[แก้ไข]

See also

[แก้ไข]