GeoServer: How do i use the language function in an SLD based style to provide internationalized legends

The problem:

The GeoServer documentation suggests that internationalized SLDs and thus internationalized legends can be supported using the ogc:language() function and rules. How do I configure an SLD to pass a raster legend in English or in French using the language parameter?

The example in the GeoServer documentation makes it look simple but I am only able to retrieve the first rule no matter the language parameter in the url GetLegendGraphic request. The documentation states:

It is also possible to use the language function in a rule filter, filtering rules for both rendering and legend production purposes. This one shows how to refer to different symbols based on the current language:

I’ve also seen that GEOS-10207 suggests that using hideEmptyRules can be used but the hideEmptyRules flag is not set by default in the GetLegendGraphic call included in the GetCapabilities and so this doesn’t seem like a great option.

I’m guessing I’m doing something wrong or interpreting something wrong but to me it seems like a language function in a filter with in a rule should let me return different legends depending on the legend parameter.

Example SLD

<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:sld="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" version="1.0.0" xmlns:gml="http://www.opengis.net/gml">
  <UserLayer>
    <Name>User Layer Name</Name>
    <LayerFeatureConstraints>
      <FeatureTypeConstraint/>
    </LayerFeatureConstraints>
    <UserStyle>
      <Name>User Style Name</Name>
      <Title>User Style Title
        <Localized lang="en">User Style Title</Localized>
        <Localized lang="fr">User Style Title in French</Localized>
      </Title>
      <Abstract>User Style Abstract
        <Localized lang="en">User Style Abstract</Localized>
        <Localized lang="fr">User Style Abstract in French</Localized>
      </Abstract>
      <FeatureTypeStyle>
        <Name>Feature Type Style Name</Name>
        <Title>Feature Type Style Title
          <Localized lang="en">Feature Type Style Title</Localized>
          <Localized lang="fr">Feature Type Style Title in French</Localized>
        </Title>
        <Abstract>Feature Type Style Abstract
          <Localized lang="en">Feature Type Style Abstract</Localized>
          <Localized lang="fr">Feature Type Style Abstract in French</Localized>
        </Abstract>
        <Rule>
          <Name>French Legend Rule</Name>
          <Title>FRENCH Rule Title</Title>
          <Abstract>FRENCH Rule Abstract</Abstract>
          <ogc:Filter>
            <ogc:Or>
              <ogc:PropertyIsEqualTo>
                <ogc:Function name="language"/>
                <ogc:Literal>fr</ogc:Literal>
              </ogc:PropertyIsEqualTo>
              <ogc:PropertyIsEqualTo>
                <ogc:Function name="language"/>
                <ogc:Literal>fr-CA</ogc:Literal>
              </ogc:PropertyIsEqualTo>
            </ogc:Or>
          </ogc:Filter>
          <sld:RasterSymbolizer>
            <ChannelSelection>
              <GrayChannel>
                <SourceChannelName>1</SourceChannelName>
              </GrayChannel>
            </ChannelSelection>
            <ColorMap type="values">
              <sld:ColorMapEntry quantity="1"   color="#d1ff73" label="FRENCH Class 1 Label"/>
              <sld:ColorMapEntry quantity="2"   color="#226633" label="FRENCH Class 2 Label"/>
              <sld:ColorMapEntry quantity="3"   color="#83c795" label="FRENCH Class 3 Label"/>
              <sld:ColorMapEntry quantity="4"   color="#70a800" label="FRENCH Class 4 Label"/>
              <sld:ColorMapEntry quantity="5"   color="#dfb8e6" label="FRENCH Class 5 Label"/>
              <sld:ColorMapEntry quantity="7"   color="#700cf2" label="FRENCH Class 7 Label"/>
              <sld:ColorMapEntry quantity="11"  color="#c4bd97" label="FRENCH Class 11 Label"/>
              <sld:ColorMapEntry quantity="13"  color="#c4bd97" label="FRENCH Class 13 Label"/>
              <sld:ColorMapEntry quantity="31"  color="#ffffbe" label="FRENCH Class 31 Label"/>
              <sld:ColorMapEntry quantity="101" color="#828282" label="FRENCH Class 101 Label"/>
              <sld:ColorMapEntry quantity="102" color="#73dfff" label="FRENCH Class 102 Label"/>
              <sld:ColorMapEntry quantity="105" color="#cccccc" label="FRENCH Class 105 Label"/>
              <sld:ColorMapEntry quantity="415" color="#ffd37f" label="FRENCH Class 415 Label"/>
              <sld:ColorMapEntry quantity="625" color="#ffd37f" label="FRENCH Class 625 Label"/>
              <sld:ColorMapEntry quantity="650" color="#ffd37f" label="FRENCH Class 650 Label"/>
              <sld:ColorMapEntry quantity="675" color="#ffd37f" label="FRENCH Class 675 Label"/>
            </ColorMap>
          </sld:RasterSymbolizer>
        </Rule>
        <Rule>
          <Name>English Legend Rule Name</Name>
          <Title>English Legend Rule Title</Title>
          <Abstract>FEnglish Legend Rule Abstract</Abstract>
          <ogc:Filter>
            <ogc:Or><ogc:Or>
              <ogc:PropertyIsEqualTo>
                <ogc:Function name="language"/>
                <ogc:Literal>en</ogc:Literal>
              </ogc:PropertyIsEqualTo>
              <ogc:PropertyIsEqualTo>
                <ogc:Function name="language"/>
                <ogc:Literal>en-CA</ogc:Literal>
              </ogc:PropertyIsEqualTo>
            </ogc:Or>
              <ogc:PropertyIsEqualTo>
                <ogc:Function name="language"/>
                <ogc:Literal/>
              </ogc:PropertyIsEqualTo>
            </ogc:Or>
          </ogc:Filter>
          <sld:RasterSymbolizer>
            <ChannelSelection>
              <GrayChannel>
                <SourceChannelName>1</SourceChannelName>
              </GrayChannel>
            </ChannelSelection>
            <ColorMap type="values">
              <sld:ColorMapEntry quantity="1"   color="#d1ff73" label="ENGLISH Class 1 Label"/>
              <sld:ColorMapEntry quantity="2"   color="#226633" label="ENGLISH Class 2 Label"/>
              <sld:ColorMapEntry quantity="3"   color="#83c795" label="ENGLISH Class 3 Label"/>
              <sld:ColorMapEntry quantity="4"   color="#70a800" label="ENGLISH Class 4 Label"/>
              <sld:ColorMapEntry quantity="5"   color="#dfb8e6" label="ENGLISH Class 5 Label"/>
              <sld:ColorMapEntry quantity="7"   color="#700cf2" label="ENGLISH Class 7 Label"/>
              <sld:ColorMapEntry quantity="11"  color="#c4bd97" label="ENGLISH Class 11 Label"/>
              <sld:ColorMapEntry quantity="13"  color="#c4bd97" label="ENGLISH Class 13 Label"/>
              <sld:ColorMapEntry quantity="31"  color="#ffffbe" label="ENGLISH Class 31 Label"/>
              <sld:ColorMapEntry quantity="101" color="#828282" label="ENGLISH Class 101 Label"/>
              <sld:ColorMapEntry quantity="102" color="#73dfff" label="ENGLISH Class 102 Label"/>
              <sld:ColorMapEntry quantity="105" color="#cccccc" label="ENGLISH Class 105 Label"/>
              <sld:ColorMapEntry quantity="415" color="#ffd37f" label="ENGLISH Class 415 Label"/>
              <sld:ColorMapEntry quantity="625" color="#ffd37f" label="ENGLISH Class 625 Label"/>
              <sld:ColorMapEntry quantity="650" color="#ffd37f" label="ENGLISH Class 650 Label"/>
              <sld:ColorMapEntry quantity="675" color="#ffd37f" label="ENGLISH Class 675 Label"/>
            </ColorMap>
          </sld:RasterSymbolizer>
        </Rule>
      </FeatureTypeStyle>
    </UserStyle>
  </UserLayer>
</StyledLayerDescriptor>

Example SLD returns.

Url: MYURL/geoserver/ows?service=WMS&version=1.3.0&request=GetLegendGraphic&format=image%2Fpng&width=20&height=20&layer=public:mylayer&style=public:test&Language=fr

Url2: MMYURL/geoserver/ows?service=WMS&version=1.3.0&request=GetLegendGraphic&format=image%2Fpng&width=20&height=20&layer=public:mylayer&style=public:test&Language=en

My geoserver version is 2.23.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật