Canonical way of "Getting language of content item" (when p.a.multilingual is installed)

Hi all,

Which would be the canonical way of getting the language of a content object in a browserview?

I'm using plone app.multilingual and it looks like there are two options:

language = obj.Language()
with the caveat "All content objects don’t necessarily support the Language() look-up defined by the IDublinCore interface."

or using the interface/adapter in CMFPlone.interfaces

language = ILanguage(obj).get_language()

I use the second approach.

1 Like