Forum

Thread tagged as: Question, Problem

French Date Structure

Hello everyone,

I have a pretty simple issue. I'm wondering if there is a simple fox to go along with it.

I have a French version of a website nested inside the root folder of my site. Perch is also located inside the root folder.

I have some french only perch content files that contain the date type. How do I specify within perch content custom to change the formatting to French?

I've seen some other examples in the support section that says to set the Locale-compatible to fr_FR, but wouldn't that affect the entire site?

Looking for your input.

Cheers, Matt

MATTHEW URSO

MATTHEW URSO 0 points

  • 2 years ago

Matt,

Hopefully this will help you....

https://docs.grabaperch.com/templates/field-types/date/

<perch:content id="event_date" type="date" label="Date of event" format="D d F y">

Drew McLellan

Drew McLellan 2638 points
Perch Support

It depends where you call setlocale(). If you do it on the page, it will affect that page.

Do you have different layouts for your two language sections? If so, I'd suggest setting the locale there perhaps.

I would like to set the language on each page, if possible.

Where would I call

setlocale()
Drew McLellan

Drew McLellan 2638 points
Perch Support

Do you have different layouts for your two language sections? If so, I'd suggest setting the locale there perhaps.