|
|
| Line 92: |
Line 92: |
|
| |
|
| -- SPECIAL SEMANTIC MAPPINGS GO HERE | | -- SPECIAL SEMANTIC MAPPINGS GO HERE |
| -- Register custom field processor for languages | | -- Languages are handled in the processors section below |
| Blueprint.addFieldProcessor(template, 'languages', function(value)
| |
| if not value or value == "" then return value end
| |
|
| |
| -- Use the NormalizationLanguage module for formatting
| |
| local NormalizationLanguage = require('Module:NormalizationLanguage')
| |
| NormalizationLanguage.setShowNativeForms(true)
| |
|
| |
| -- Process semantic property for languages
| |
| local SemanticCategoryHelpers = require('Module:SemanticCategoryHelpers')
| |
| local semanticOutput = SemanticCategoryHelpers.addSemanticProperties("language", value, "")
| |
|
| |
| -- Return formatted display value with native names
| |
| return NormalizationLanguage.formatLanguages(value)
| |
| end)
| |
|
| |
|
| -- ================================================================================ | | -- ================================================================================ |