We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Literal#english?
1 parent f5dd4e8 commit 55afa63Copy full SHA for 55afa63
1 file changed
lib/rdf/model/literal.rb
@@ -451,6 +451,16 @@ def valid?
451
false
452
end
453
454
+ ##
455
+ # Returns `true` if this is a language-tagged literal in the English
456
+ # language.
457
+ #
458
+ # @return [Boolean] `true` or `false`
459
+ # @since 3.3.2
460
+ def english?
461
+ /\Aen(?:-[A-Za-z]{2})?\z/ === language.to_s
462
+ end
463
+
464
##
465
# Validates the value using {RDF::Value#valid?}, raising an error if the value is
466
# invalid.
0 commit comments