Multilingual range of content

mmh, if it were mine I would go with layouts instead of shortcodes.

code Updated to match Multilingual range of content - #6 by irkode

if you need additional stuff between the galleries than code put the code in shortcoddes.

the gist is - move all of the country properties to the gallery itself for a single point of true

changes to germany only need to be done in one file. and will be pulled in by the main _index automatically

something like:

_index.md
+++
draft = false
title = 'Fotos'
description = 'Fotos aufgenommen von M.'
+++
layout for _index.md
{{/*  maybe use .ByWeight (define on the pages) , maybe sort alphabetical or a simple list for full control*/}}
{{ range .Pages }}

  {{/* all attributes defined on the country page */}}

  <h2>{{.Params.Headline}}</h2>
  
   {{ with index .Params.gallery (sub .Params.teaserImage 1) }}
    THUMB: {{ .thumb }}
    IMAGE: {{ .image }}
  {{ end }}
    <a href={{.RelPermalink}}>See all of ...</a>
{{ end }}
germany/index.md
+++
title = 'Fotos Deutschland'
description = 'Fotos aufgenommen in Deutschland von M.'

[params]
headline = "Germany"
teaserImage = 1

[[params.gallery]]
caption = "Germany - Foto #1"
thumb = "/images/photos/deutschland/deutschland-01-thumb.webp"
image = "/images/photos/deutschland/deutschland-01.webp"
id = "deutschland_Photo_1"

[[params.gallery]]
caption = "Germany - Foto #2"
thumb = "/images/photos/deutschland/deutschland-02-thumb.webp"
image = "/images/photos/deutschland/deutschland-02.webp"
id = "deutschland_Photo_2"

[[params.gallery]]
caption = "Germany - Foto #3"
thumb = "/images/photos/deutschland/deutschland-03-thumb.webp"
image = "/images/photos/deutschland/deutschland-03.webp"
id = "deutschland_Photo_3"
+++

layout for germany/index.md

<h2>{{ .Title }}</h2>
{{ range .Params.gallery }}
  caption: {{ .caption }}
 ...
{{ end }}

if your images really follow these naming convention , you already have an order and can completely automate these.
I would move or mount the images to assets (or the country folder as page resource, to use [rR]esources.get “images/germany/*.webp” (if your images sort order is the display order.

completely untested just an idea: but for the definition in frontmatter have a look at resources metadata in frontmatter
where you can map page resourcses to names/and attributes

maybe of target … missing lot of context with your actual intention :wink: