mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-26 02:36:22 +00:00
16 lines
265 B
Ruby
16 lines
265 B
Ruby
# frozen_string_literal: true
|
|
|
|
# Un campo de idioma
|
|
class MetadataLang < MetadataTemplate
|
|
def default_value
|
|
super || I18n.locale
|
|
end
|
|
|
|
def value
|
|
self[:value] ||= document.collection.label || default_value
|
|
end
|
|
|
|
def values
|
|
site.locales
|
|
end
|
|
end
|