Jump to content

how to change the default language in processwire cms

Recommended Posts

At this point it's quite easy.

  1. First of all import the language pack. As you have already done I guess.
  2. Second to that change labels/titles. As you have done already as well.
  3. Third and last part log out and log in again. That performs kind of a reset in your session and cache. The ProcessWire interface should be in russian then.


Link to comment
Share on other sites

Well... change the content in your pages, edit the template files (/site/templates/) if necessary and you are ready to go.

You might want to take a closer look at this: https://processwire.com/docs/multi-language-support/

There you will find every detail you need and probably want to know.

The most relevant parts are in your template files in the content pages itself. There is not much necessary here.


Did you a fresh ProcessWire installation or are you updating an existing one? 

Link to comment
Share on other sites



https://processwire.com/docs/multi-language-support/   is so big, i read it but just went crazy

can you tell me just briefly what to do after

  1. First of all import the language pack. As you have already done I guess.
  2. Second to that change labels/titles. As you have done already as well.
  3. Third and last part log out and log in again. 


Link to comment
Share on other sites

I don't know any video you could watch which explains that ProcessWire setup in that detail.

But as you are working on a fresh installation you don't have to anything. Almost.

You can just add pages, add content in russian language and you are done.

There might be some parts in the frontend which need translation and those can either be changed in the template itself or within the language (default language: /yourProcessWireAdmin/setup/languages/edit/?id=1010).

Depending on how much experience you have with ProcessWire and what kind of page you want to build you SHOULD read what I linked to above. You may even want to read the tutorials on how to work with the whole setup.

Link to comment
Share on other sites

Maybe I don't really understand your problem here.

The default language itself is english but as soon as you install a language pack to/into the default language it's (in your case) russian. Or french. Or finnish. From then on it's business as usual.

Have you ever used ProcessWire before?
What's the main issue you are facing right now? The overall functionality of ProcessWire maybe?

My PWBRecipes profile has english as default, too. That won't help you.

  • Like 1
Link to comment
Share on other sites

Note: your current server locale setting isn’t working as expected with the UTF-8 charset and may cause minor issues. Your current locale setting is “en_EN.UTF-8”. Please translate the “C” locale setting for each language to the compatible locale in /wire/modules/LanguageSupport/LanguageSupport.module:

this appears again & again despite i did translate the “C” locale setting for each language  

here why can't i see Russian?

Opera Снимок_2019-05-13_110320_school-vr.ru.png

Link to comment
Share on other sites

I did that but  Russian instead of  Italian

To use Italian as your default language on the frontend, and considering your want "example.com/" to open in Italian and "example.com/en/" to change to English, do the following:

  1. As this is a new installation, and you have no real data yet, delete all languages but the default one, of course. 
  2. Change the default language title to Italiano
  3. Upload Italian translation files to it
  4. Create a new language, name "en", title "English"
  5. Edit the homepage and set the "en" language as active and the url as  "en". 
Link to comment
Share on other sites

@wish-fulfillment In your site tree look for the root page and in the settings tab look which URL it has for russian (your default). It should be (ru)

However, I noticed that it is a bad practice to modify the default language (english) with language files.
Instead you should add russian as an ADDITIONAL language and then set the guest user to this language (for the frontend) and also your admin user, so the PW admin is also in russian.

Made the same mistake as you on a big site (although it works) and now it is too much work to change it.

Edit: This is not the case anymore

  • Like 3
Link to comment
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 horst
      Change Default Language to be None-English | Walk Trough
      When you start a new (single) language site and the default language shouldn't be English, you can change it this way:
      Go to the modules core section:

      Select the Language ones by the filter function:

      We have four language related modules here, but for a single language site in none english,
      we only need the base module, named "Languages Support". So go on and install it.

      After that, you can leave it, ... 

      ... and switch to the newly created Language section under SETUP:

      Select the default language

      Enter your new language name or its Shortcut and save the page.
      I will use DE for a single language site in german here as example:

      Now I go to the ProcessWire online modules directory, down to the subsection for language packs and select
      and download my desired (german) one: 




      After downloading a lang pack as ZIP, I go back into my SETUP > LANGUAGES > default language page in admin,
      select the downloaded lang pack ZIP and install it:



      After the ZIP is uploaded, the files are extracted and installed, most of my screen is already in
      the new default language. To get all fully switched, we save and leave that page, ...

      ... and completely logout from the admin.

      Now, of course, we directly login back, ...

      ... and see, that now also the cached parts of the admin have switched to the new default language. 🙂

      That was it for a single language site in none english.
      If you want to have a multi language site, just add more languages to the SETUP > LANGUAGES section.
      When using a multi language site, I think you also want to use multi language input fields, and maybe different page names for your language page pendents. If so, you need to go into MODULES > CORE > filter LANGUAGE and install what you need or want to use of it, (if not already done).
      Thanks for reading and happy coding, 🙂
    • By DV-JF
      Hey girls and guys,
      I'll want to open this thread in order to discuss a main problem I've run into with following setup:
      I'm maintaining a site where different URLs are directed to the same folder. In site/ready.php the $user->language is set based on the $config->httpHost
      <?php /* Set language based on the domain and user is not logged in */ /* Slovenian */ if( $config->httpHost == "www.domain.si" || $config->httpHost == "domain.si" || $config->httpHost == "domain.si.local") { if (!($user->isSuperuser())) $user->language = $languages->get('si'); } /* German */ elseif( $config->httpHost == "www.domain.at" || $config->httpHost == "domain.at" || $config->httpHost == "domain.at.local" || $config->httpHost == "domain.ch" || $config->httpHost == "www.domain.ch" || $config->httpHost == "domain.de" || $config->httpHost == "www.domain.de") { if (!($user->isSuperuser())) $user->language = $languages->get('default'); } /* Croatian */ elseif( $config->httpHost == "www.domain.hr" || $config->httpHost == "domain.hr" || $config->httpHost == "domain.hr.local") { if (!($user->isSuperuser())) $user->language = $languages->get('hr'); } /* English */ elseif( $config->httpHost == "www.domain.eu" || $config->httpHost == "domain.eu" || $config->httpHost == "domain.eu.local") { if (!($user->isSuperuser())) $user->language = $languages->get('en'); } /* Italian */ elseif( $config->httpHost == "www.domain.it" || $config->httpHost == "domain.it" || $config->httpHost == "domain.it.local") { if (!($user->isSuperuser())) $user->language = $languages->get('it'); } The homepage (id=1) has following settings:

      As you can see German (Deutsch) is set as default language. Everything is working nice and fine and I'm really happy with this kind of setup but now there are some new requirements, which causes me quite a headache :
      I've to add some pages only in one or two languages (they should not be present in German) I've to create some editor roles that are allowed to only edit (can be done with https://processwire.com/docs/user-access/permissions/#multi-language-page-edit-permissions) & add pages to their specific language. What I've found out so far:
      The default language can't be disabled and must always be present (though this would be in my eyes the easiest solution) Creating my own "language select field" - example here: won't work in this case because I've to rely on the native languages in order to setup the right permissions for editors. There seems to be some solutionsbut I think these won't match for me because I've to think about handling editors and permissions, too. After searching and searching, scratching my head and searching and searching again, the only possibility that comes to my mind is to add another language for German and assign this language to the specific URL's instead of the default language.
      The advantages with this solution for me:
      I could activate or deactivate any language on any page Editors which are allowed to add pages can get the permission page-edit-lang-default without affecting the German pages. The disadvantages:
      All multi-language-fields will have an empty tab for the default language - this may irritate editors a lot Seems to me like a lot of work to do because I've to copy the language field nearly for 1000 pages/repeaters (maybe I'll find an SQL query) My questions:
      How would you handle this task? Could my setup be optimized in a completely different way? If I go for my solution (adding another language for German) would it be possible to hide the language tab for default language in any way?  If some points aren't clear enough please don't hesitate to ask.
      Many greets...
    • By Fuad Ibrahimov
      Hi all!
      I have a problem with selecting default language in frontend.
      I tried to set default language from admin panel in Access->Users for guests and admin to another language, but it changed only backend language.
      I read a lot of topics about this problem and i didn't find any normal solution.
    • By saschapi
      hi guys, I have a project which is about to get live and it has two languages:
      default: englisch
      second: german
      Unfortunatelly translation of content will not be done in English for the launch. How can I simply redirect EVERY person that is not logged in to the German version of a page? 
      Once everything has been translated I will delete the redirect and everything should be fine. It would be great to have a redirect only for not logged in users so the editor can check how the site looks like when adding the translations.
      Any idea?
      thanks Sascha
    • By bcartier
      I while ago, I started a site on dev branch 2.5.19, and built out a bilingual site in English and French. My default language is English and I added French as a second language. I'm using LanguageSupportPageNames and my homepage names are "/" for english and "/fr" for French.
      Everything works great. But... now the client wants to change the site so that French is the default language.
      I've tried:
      setting the Guest user's language preference to French - no effect. detecting the URL and manually setting the $user->language  in _init.php variations on naming the homepage "en" and "fr" istead of "/" and "fr", but the redirect still seems to redirect the homepage URL of the default language  to "/" even if I've specified "en".  I've looked at the LanguageSupportPageNames settings and have tried both the recommended option and including the redirect in combination with URL detection. Still can't get it working. Does anyone have any recommendations? I really don't want to rebuild the site from scratch just to reset the default language :-(
      Thanks for your help,
  • Create New...