Jump to content

Multi-Language - Active Checkboxes and 404 Page


BenG
 Share

Recommended Posts

Hi,

I'm new to PW and try to set up a multilingual website with "Language Support Page Names".

Basically everything is working but I have 2 Problems:

(x) The "Active?" Checkboxes don't show up which means that I can't deactivate pages which are not translated yet.

http://processwire.com/api/multi-language-support/multi-language-urls/

(x) 404 Page. I added the language switcher solution of the above mentioned article. However this code doesn't work on 404 Pages. Is there a way to fix that?

Thank you :)

Link to comment
Share on other sites

Hello Ben, welcome to the forum.

First issue is odd... are you using a custom theme?

As for the 404, it works for me... can you see if it works when you visit this: www.yourdomain.com/fr/jksndkjbskjdjds where the segments are:

[your domain] / [second language name] / [random blob]

Link to comment
Share on other sites

Hi diogo,

thx for the response. I'm using a "plain" installation (2.3.0) without anything else installed except those language modules: 

Installed Language Modules:

Language Field Tabs 1.0.7 Organizes Language Fields into tabs for a cleaner easier to use interface

Languages Support 1.0.0 ProcessWire multi-language support.

Languages Support - Fields 1.0.0 Required to use multi-language fields.

Languages Support - Page Names 0.0.3 Required to use multi-language page names. In development, NOT for production use.

Is it possible that the activate feature was removed in version 0.03?

Thanks

EDIT: For the 404: Doesn't work :)

Link to comment
Share on other sites

You should try switch wire folder for the latest dev version, I think all those issues were recently fixed but only available in dev.

Thank you. I tried that. That would work, however it's not working for me atm. I tried to change some fields to Textarealanguage but PW won't create the appropriated tables in db.

I guess it's because of the switch to PDO.

Link to comment
Share on other sites

Soma is right that you'd need the latest dev version (2.3.2) to take advantage of these features and updates. 

When you replace the /wire/ directory, make sure you remove the old one first and then put in the new one. Trying to copy over the old one is problematic just because it can result in duplicate and/or extra files. 

Thank you. I tried that. That would work, however it's not working for me atm. I tried to change some fields to Textarealanguage but PW won't create the appropriated tables in db.

PW doesn't create new tables when you change a field's type from Textarea to TextareaLanguage. Instead it modifies the schema of existing tables. 

I guess it's because of the switch to PDO.

So long as you have PDO, it should not matter. If your site works at all, then you have PDO. Check that your PHP version is newer than 5.3.8, that you replaced the /wire/ directory as mentioned above, and that you replaced your /index.php and /.htaccess file with the new versions (though that part may not be necessary).

Link to comment
Share on other sites

Soma is right that you'd need the latest dev version (2.3.2) to take advantage of these features and updates. 

I finally managed to get everything up and running using the dev branch.

I try to get familiar with module development atm.

The error which i was talking about only occurs if you add a new language before you change the Fields to TextareaLanguage,..

(I use the Template that ships with PW)

Thank you.

Link to comment
Share on other sites

The error which i was talking about only occurs if you add a new language before you change the Fields to TextareaLanguage,..

(I use the Template that ships with PW)

Is this still the case even in the dev branch (2.3.2)? So far I can't duplicate. If you only tested this in 2.3.0, don't worry about trying it again as I'm pretty sure we fixed this one already in dev. 

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Similar Content

    • By androbey
      Hi there, 

      I feel like I have another rather stupid question, but I am stucked in a problem. 
      I wrote a small module, which makes use of the multi-language option.

      The inputfield code looks like this:
      $donationText = $this->modules->InputfieldCKEditor; $donationText->useLanguages = true; $donationText->name = 'donationtext'; $donationText->label = 'Donation CTA Text'; $donationText->value = $this->donationtext; $donationText->required = true; $wrapper->add($donationText); My simplified render method in the module looks like this:
      public function renderDonationCTA(){ echo $this->donationtext; } However, when I call this method in my template code only the default language gets outputted.
      What did I miss or what can I do, in order to output the inserted text in the "right" language? 
    • By zaib
      I'm fetching results from a template which works fine but when i change the language (in my case changed language is ARABIC), its showing me nothing
      $getResult = $pages->find("template=t3Cities_list, tags={$page->title}"); where "tags" are checkboxes with multi selection, How i can match the values?
    • By Marcel Stäheli
      Hello
      if have a few article pages that have a multi-page reference field with tags about the content of the article. All tags of a given page are displayed and link to a tag-overview page.
      Every link has a query string added with the tag name like &tag=cars so that I know which articles have to be displayed on the tag-overview page,
      The tag name is created using $tag->name. Since the website is multi language using German (default) and English, I use $page->localName($language) to get the localized page name . The code looks like this:
      foreach($tags as $tag) { $tagsMarkup .= "<a href='" . wire('pages')->get('/tags-overview/')->url . "?tag=" . $tag->localName(wire('user')->language) . "'>" . $tag->title . "</a>, "; }
      The code works mostly fine, but when a page has the same name in both languages, the query string will have no value just ?tag=. Why?
       
      A second problem that might be tied to the first:
      Once on that tags-overview page, I check if the tag actually exists using:
       
      $allTags = $pages->get("/tags/")->children); if($allTags->has("name=$tag") {...} But as I read on the forum (https://processwire.com/talk/topic/2979-multi-language-page-names-urls/?page=6) that only checks for name in the default language. It was suggested to use $page->parent->path . "pageNameEnglish" but I'm not sure where and how to use it in my case.
      Any help?
       
    • 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 heldercervantes
      I've had this happen before, but now I got this problem again and I'm wondering what it's about.
      I use the basic <?= __('Contacte-nos') ?> method for adding translatable text to templates. Some of these are not appearing on the form when I edit the file's translations in PW.
      Take this line of code:
      <?= __('1 ou +7 pessoas?') ?> <a href="#" class="contactsMenu"><?= __('Contacte-nos') ?></a> The first string "1 ou +7 pessoas?" appears when I edit the translations, but the second one doesn't. Eventually I figured out I can only have one of these per line of code. Adding a line break somewhere somewhere between them was enough to make both translations show up in the form.
      Problem solved, but curiosity remains. What is the reason for this?
×
×
  • Create New...