1. Component Guide
  2. Image card
  3. With lang
Image card example

With lang

Pass through an appropriate lang to set a HTML lang attribute for the component.

The lang attribute must be set to a valid BCP47 string. A valid code can be the two or three letter language code - for example, English is en or eng, Korean is ko or kor - but if in doubt please check.

How it looks (preview)

How to call this example

<%= render "govuk_publishing_components/components/image_card", {
  href: "/not-a-page",
  image_src: "https://assets.publishing.service.gov.uk/government/uploads/system/uploads/feature/image/62756/s300_courts-of-justice.JPG",
  image_alt: "some meaningful alt text please",
  heading_text: "Yr hyn rydym ni'n ei wneud",
  lang: "cy"
} %>