Skip to content

La Boulangère Translating & Localizing an Ad Campaign

In 1969, Jean Fillon started his bakery in La Chataigneraie, Vendée, France. After gaining success, he expanded his business by delivering brioche and breads to local supermarkets. Today La Boulangère produces many baked goods en masse sold in supermarkets worldwide.

The Problem

The Director of Marketing for La Boulangère in the USA & Canada wrote a stellar advertisment in the English language for marketing the sale of their chocolate croissants to supermarkets across both nations. They would love to translate the advertisment from English to French using OpenAI's API so that they can send it to supermarkets in Quebec as well.

Upon hearing about the success of the advertisment, the Director of Marketing in the EMEA region would like to use the translated advertisment to market the sale of their chocolate croissants in different francophone regions.

The sample advertisment:

"I’m proud to introduce our authentic Chocolate Croissants, crafted in France and baked to golden perfection. Made with real butter, premium cocoa, and traditional French pastry expertise, each croissant delivers the flaky, melt-in-your-mouth texture that consumers crave. Already a household favorite across Europe, La Boulangère brings a touch of Parisian indulgence to North American breakfast aisles — with individually wrapped, ready-to-eat convenience and clean, simple ingredients that align with today’s demand for quality and authenticity. Stock La Boulangère Chocolate Croissants and offer your shoppers a premium, irresistible treat that turns every morning into a moment of French delight."

The code

import os from openai import OpenAI # Define the model to use model = "gpt-4o-mini" client = OpenAI(api_key="<OPENAI_API_TOKEN>") messages = [{"role": "system", "content": """You are a translation and localization expert who specializes in adapting advertisments from English to French. Your translations should: - Reflect authentic regional French usage (e.g., refer to chocolate croissants in Occitanie, the City of Bordeaux, or Quebec as "chocolatine", in the rest of France refer to it as "pain au chocolat" , and in Belgium refer to it as a "conque au chocolat", etc.). - Maintain the tone, emotional appeal, and marketing intent of the original advertisement. - Adapt idioms, cultural references, and brand voice to sound natural and persuasive to the target audience. Structure your response like: Region | translated text If the text input from the user is not written in the English, return the message: 'Apologies, to adapt your advertisment into French, you must input an English text.' """}] user_msgs = ["""Translate the advertisement from English into French and adapt the text to regional differences. I’m proud to introduce our authentic chocolate croissants, crafted in France and baked to golden perfection. Made with real butter, premium cocoa, and traditional French pastry expertise, each croissant delivers the flaky, melt-in-your-mouth texture that consumers crave. Already a household favorite across Europe, La Boulangère brings a touch of Parisian indulgence to North American breakfast aisles — with individually wrapped, ready-to-eat convenience and clean, simple ingredients that align with today’s demand for quality and authenticity. Stock La Boulangère chocolate croissants and offer your shoppers a premium, irresistible treat that turns every morning into a moment of French delight."""] #Loop over the user questions for q in user_msgs: print("User: ", q) # Create a dictionary for the user message from q and append to messages user_dict = {"role": "user", "content": q} messages.append(user_dict) # Create the API request response = client.chat.completions.create( model="gpt-4o-mini", messages=messages, ) # Append the assistant's message to messages assistant_dict = {"role": "assistant", "content": response.choices[0].message.content} messages.append(assistant_dict) print("Assistant: ", response.choices[0].message.content, "\n")

The code above translates the text from English to French and translates "chocolate croissants" to "chocolatine","conque au chocolat", and "pain au chocolat" depending on the region.

A sample from the prompted response:

France (rest of France) | Je suis fier de vous présenter nos authentiques pains au chocolat, fabriqués en France et cuits a la perfection dorée. Réalisé avec du vrai beurre, du cacao...

Occitanie | Je suis fier de vous présenter nos authentiques chocolatines, fabriquées en France et cuites a la perfection dorée. Réalisées avec du vrai beurre, du cacao...

Quebec | Je suis fier de vous présenter nos authentiques chocolatines, fabriquées en France et cuites a la perfection dorée. Réalisées avec du vrai beurre, du cacao...

Belgium | Je suis fier de vous présenter nos authentiques conques au chocolat, fabriquées en France et cuites a la perfection dorée. Réalisées avec du vrai beurre, du cacao...