Peter Knight

Confused about server locales

4 posts in this topic

I have just published my first PW multi-lingual site.

I'm not understanding the following message and the server locale function

 Warning: your server locale is undefined and may cause issues. Please translate the “C” locale setting for each language to the proper locale in /wire/modules/LanguageSupport/LanguageSupport.module (shortcuts provided below):
• English
• Français
• Deutsch
• Español
• Italiano
For example, the locale setting for US English might be: en_US.UTF-8

Is it just a case to populate each languages "C" field with an appropriate string? IE

English C field: en.UTF-8
Francais C fieldn: fr_FR.UTF-8

Deutsh C field: en.UTF-8
Espanol C field: es_ES.UTF-8
Italiano C field: it_IT.UTF-8

Share this post

Link to post
Share on other sites

Lots of info and links about how to handle this - there is more than one approach, so worth reading so you get a better understanding of what is going on:


1 person likes this

Share this post

Link to post
Share on other sites

To get the correct locales for YOUR server (each server might use different ones) just use the below code.

<pre><?php passthru("locale -a"); ?></pre>

It will show you a list with all locales installed on your server.

2 people like this

Share this post

Link to post
Share on other sites

Thanks guys. I understand the context now and have fixed the issue.

Interestingly a list of UNIX server locales I found online were different than the ones installed on my VPS so that was something to be aware of. 

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Peter Knight
      I was trying to fix an error earlier which was preventing a series of if statements from working.
      Basically I have a button called "Product Drawing" which needs localising depending on the current language session.
      Eventually got it working - I had a bracket in the wrong place.
      Curious as to why both these work though.
      On the sample below. each echo is surrounded by curly braces.
      <?php if ($page->files->count()) foreach($page->files->findTag('drawing') as $file) { if($user->language->name == 'default') {echo "<a href='$file->url' class='uk-button uk-button-primary'>Product drawing</a>";} if($user->language->name == 'french') {echo "<a href='$file->url' class='uk-button uk-button-primary'>Le plan du produit</a>";} if($user->language->name == 'german') {echo "<a href='$file->url' class='uk-button uk-button-primary'>Produktzeichnung</a>";} if($user->language->name == 'spanish') {echo "<a href='$file->url' class='uk-button uk-button-primary'>El dibujo del producto</a>";} if($user->language->name == 'italian') {echo "<a href='$file->url' class='uk-button uk-button-primary'>Il disegno del prodotto</a>";} } ?>  
      On the sample below, there are no curly braces around the echo
      <?php if ($page->files->count()) foreach($page->files->findTag('breakingreport') as $file) { if($user->language->name == 'default') echo "<a href='$file->url' class='uk-button uk-button-primary'>Breaking strain report</a>"; if($user->language->name == 'french') echo "<a href='$file->url' class='uk-button uk-button-primary'>Le test de rupture</a>"; if($user->language->name == 'german') echo "<a href='$file->url' class='uk-button uk-button-primary'>Bruchfestigkeit bericht</a>"; if($user->language->name == 'spanish') echo "<a href='$file->url' class='uk-button uk-button-primary'>Informe resistencia</a>"; if($user->language->name == 'italian') echo "<a href='$file->url' class='uk-button uk-button-primary'>La rottura rapporto ceppo</a>"; } ?>  
      Should the second piece work?
    • By ceberlin

      A new band website for the German electronic avant-garde band DEINE LAKAIEN.
      The idea was to make this an introduction website for media and new listeners. For in-depth information, the website is accompanied by another new ProcessWire website (with an integrated xenforo forum) for the fanclub: and the label website All three websites use the same UI and re-occurring elements (while preserving a unique look), so people find their way around easily.
      Design/programming details:
      It was tried to make the dark look (which is the band CI) feeling modern and artistic (avoiding a Nineties look which so many dark themed websites have).
      The website is built in my spare time in 5 weeks thanks to the ease of ProcessWire 3 and is fully responsive (using uikit and Hype). ProcessWire's new language features were more than welcome to make language management a breeze (People coming from WordPress know what I mean).
      The backend is build in a way that non-techies (band, volunteer translators, fanclub, booking) can handle the CMS without needing much support and knowledge of SEO. Everything is explained or almost self-explanatory. And the complex internal link-building is done either fully automatic or half automatic. 
    • By ounos
      I 've got 2 languages let's say default and german and I am using multilingual fields:
      Is there a way to disable fallback to default language url if german is not active for a page ? Is there a way to have active only the german language for some pages  ? redirects to, can I disable that ?
    • By obiuno
      Dear all
      I have created a website for a local newspaper and I am trying to make its search field to work using as input greek words (letters) but in vain.
      I tried to figure out what is going on and even to borrow any idea from the recent multilingual profile which is optional during new installations...but also on this one I tried to search english or suomi or deutsch words but neither it, was functioning....
      I would much appreciated your kind assistance and support
    • By rlindgren
      I have installed ProcessWire 2.3 and bought FormBuilder. I have multilingual website and would need to create forms with multilingual placeholders and labels. I could not figure out how to do this by myself. Any help would be appreciated greatly!