Jump to content
wish-fulfillment

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.

 

Share this post


Link to post
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? 

Share this post


Link to post
Share on other sites

fresh 

SORRY 

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. 

 

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
4 hours ago, wish-fulfillment said:

how to change the default language in processwire cms

Hello, you need somthing like this?

 

  • Like 2

Share this post


Link to post
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:
 English
 rus

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

Share this post


Link to post
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". 

Share this post


Link to post
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.

  • Like 3

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • 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,
      -Brent
    • By overoon
      hi there,
      this is my first post in the forums, and i got to say that up to this point working with process wire was a really easy-going experience. now i'm not quite sure if i'm just over-thinking my whole problem and i hope someone can help me.
      i have a setup of processwire running with german as default and english as additional language. i successfully implemented a language-switcher which works like a charm.
      now i want processwire to automatically check the visitors browserlanguage (basically on starting the session) and set it as default (if not german -> english)
      BUT
      keep open the possibility to do a manual switch.
      my first very, very simple piece of code (which terribly failed) looked like this (in my header template)
      if(substr($_SERVER['HTTP_ACCEPT_LANGUAGE'],0,2) != 'de') {     $user->language = $languages->get('en'); } now i know what the problem is (my header.inc gets included everytime and does this request even after a switch), but cant make my mind up about a proper solution...
      i also didnt find something about this very specific problem by using the search, but am really grateful about any advice
      best,
      overoon
×
×
  • Create New...