Localization for regions (French - Africa)

Hello everyone,

I got a question regarding the Localization.

My client would like to get a locale for French - Africa and one for French - Europe.
He would like to customize the content and promote some products in both areas.
I haven’t found any locales in the list that could fit for Africa.
For Europe, I think I could just use the French (Standard).

Any ideas ?
Thanks for your help !

1 Like

Hi Anne, same issue here. Did you find a way ?
All the best,
Maxime

@Annaaa @Maxime_Moru

Are you intending to localize the text itself, or to simply have other variations such as featured product, contact addresses, etc?

The problem is that Africa isn’t a country, and language-region tags are specified as language-country. When you’re talking about French Africa, IETF language tags include:

Algeria (fr-DZ ), Benin (fr-BJ ), Burkina Faso (fr-BF ), Burundi (fr-BI ), Cameroon (fr-CM ), Central African Republic (fr-CF ), Chad (fr-TD ), Comoros (fr-KM ), Democratic Republic of the Congo (fr-CD ), Republic of the Congo (fr-CG ), Côte d’Ivoire (fr-CI ), Djibouti (fr-DJ ), Equatorial Guinea (fr-GQ ), Gabon (fr-GA ), Guinea (fr-GN ), Madagascar (fr-MG ), Mali (fr-ML ), Mauritius (fr-MU ), Niger (fr-NE ), Rwanda (fr-RW ), Senegal (fr-SN ), Seychelles (fr-SC ), Togo (fr-TG ), and Tunisia (fr-TN ).

I’m not a language expert but what I’m reading indicates there are notable variations in each dialect including vocabulary differences.

Even if you could just pick a few, Amazon translate doesn’t support machine translation for any of these, so you’d need to find a suitable code and do the translation work yourself. And that’s assuming you can find a relevant code in Webflow’s language list.

I think I’d try to pivot on this even though it’s not a comprehensive solution;

  • Build the site in european french only
  • Offer a country selector, but not a language selector
  • Custom-code a mechanic to show and hide various content depending on which country has been chosen
  • Possibly use GeoIP lookup to automatically select the visitor’s country automatically
1 Like

Michael, thanks for your time!
It’s exactly what I was looking for, a way to implement country selector and guess it automatically.
Best regards

That would be fun to build.

For the auto-detection part, it’s possible to do the geoip detection client-side, but you generally need a paid service. I like IPInfo. Keep in mind with all of these services, you’ll get a wide range of accuracies, but country identification is generally decent, though I have not tested this in Africa.

{
    "ip": "129.234.192.71",
    "hostname": "129.234.192.71.adsl.xtra.co.nz",
    "city": "Greerton",
    "region": "Bay of Plenty",
    "country": "NZ",
    "loc": "-37.7254,176.1335",
    "org": "AS4771 Spark New Zealand Trading Ltd.",
    "postal": "3142",
    "timezone": "Pacific/Auckland"
}

There is a very slight delay as well in a client-side setup as you’ll have to hit a 3rd party API, get your data, and then update your UI accordingly.

But here’s a crude demo and cloneable to show the functionality and implementation code ( codepen at the bottom ).

https://webflow-forms-demo.webflow.io/special/ip-info

For a professional implementation, I prefer to build a reverse proxy setup through Cloudflare, which can be configured do geo-routing, or to automatically deliver the GeoIP information as a response header.

Unfortunately client-side JS can’t access response headers, so you need to build a worker to extract the JS info and embed it into the page e.g. as a META or script block. In advanced situations, you can build this out so that your elements and sections are tagged with custom attributes by country, and you can then have them automatically “gated” server-side.

Keep in mind that gating your content will mess with Googlebot. You may want a default “show everything” behavior for bots, or a specific configuration for out-of-region countries.

Drop me a message if you need some professional dev work done on this, looks like a fun project.