Jump to content
  • ×   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...