GetSimple Support Forum
404 Page Translation : Dev Questions & Vote - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Developer Discussions (http://get-simple.info/forums/forumdisplay.php?fid=8)
+--- Thread: 404 Page Translation : Dev Questions & Vote (/showthread.php?tid=1403)



404 Page Translation : Dev Questions & Vote - ccagle8 - 2011-03-13

Ok, someone brought up that the 404 page is not able to be translated because it is a hard-coded XML file that GetSimple is shipped with. Thinking about this, I see two options, and I wanted to get a vote from everyone involved:
  • Add a sidebar button within "Templates" that allows you to edit the 404.xml file
    - Should the content are be a text area that allows HTML?
    - Should it have a WYSIWYG editor?

  • Check to see if there is a 404.php template file within a theme. If so, use that instead of the 404.xml file


Please vote as to which option you feel is better... Thanks!

Issue : http://code.google.com/p/get-simple-cms/issues/detail?id=143


404 Page Translation : Dev Questions & Vote - Joshas - 2011-03-13

Not sure which one is better for multilanguage websites, but I'd prefer having 404.php template within custom theme.


404 Page Translation : Dev Questions & Vote - ccagle8 - 2011-03-14

That is what I am leaning towards also because if people want to change the wording, then they will inevitably want to set the style as well (which can only be done from a template file)

I still want to hear from other developers out there to see if they agree...


404 Page Translation : Dev Questions & Vote - Connie - 2011-03-14

First I had the idea to place that into the settings area, but you are right: it belongs to the custom themes so we can edit it according to the themes


404 Page Translation : Dev Questions & Vote - mvlcek - 2011-03-14

Why do you want to make it more complex than necessary?

Just check if there is a page with slug name 404 (404.xml) and display it, if it exists.
This way on multilanguage sites (I18N plugin), users can create pages 404_de, 404_it, etc. to present the error in the correct language.


404 Page Translation : Dev Questions & Vote - ccagle8 - 2011-03-14

i like that idea even better! that way if they want to style it, then they can by simply selecting a template in page options. see thats why we do this... thanks


404 Page Translation : Dev Questions & Vote - Texta - 2011-03-14

I agree with mvlcek.


404 Page Translation : Dev Questions & Vote - ccagle8 - 2011-03-14

agreed - ive changed the code to do what mvlcek suggested. case closed!


404 Page Translation : Dev Questions & Vote - yojoe - 2011-03-14

hmm...what if template creator forgets to add 404.php ?
If there's no 404.php template, and 404 slug, GS still should at least take the 404 message translation from translation file.


edit: easiest solution was just to make a 404.html page in root directory, and it worked. But it was embeded as page content, not as a stand alone page.


404 Page Translation : Dev Questions & Vote - mvlcek - 2011-03-14

yojoe Wrote:hmm...what if template creator forgets to add 404.php ?

Then - like now - the standard english message will be displayed.


404 Page Translation : Dev Questions & Vote - yojoe - 2011-03-15

mvlcek Wrote:
yojoe Wrote:hmm...what if template creator forgets to add 404.php ?

Then - like now - the standard english message will be displayed.

Let's not forget about non-technical users, who use default GS templates, which do not have translated 404's, and just use a translation file.

I'm barely talking about me, cause I'll be fine. It's just about users, who cannot manage and code everything by themselves.


404 Page Translation : Dev Questions & Vote - Texta - 2011-03-15

Yes, I agree (again ...). So it should be possible to put a section to be translated into the language file.


404 Page Translation : Dev Questions & Vote - Rene - 2011-04-08

Hitting this page searching for 404 options / plugin ...

Using all of mvlcek i18n plugins and his idea to check if there is a page with slug name 404 (404.xml) and display it (if it exists) seems to be the perfect way (styling, change wording & translation) by me.


404 Page Translation : Dev Questions & Vote - krisu - 2011-04-09

My suggestion is that translators should able translate the 404 with translation file, but user can have control over it if he wants way that mvlcek suggested.

...if I understand this correctly.


404 Page Translation : Dev Questions & Vote - mvlcek - 2011-04-09

krisu Wrote:My suggestion is that translators should able translate the 404 with translation file, but user can have control over it if he wants way that mvlcek suggested.

Yes that's best: If there is a page 404.xml, display it (like a normal page is displayed, i.e. with hooks), otherwise display the default title/message, which should be read from the language files instead of being hardcoded.

By displaying the 404-page with all hooks, the correct language page can be displayed (with the I18N plugin) and one can even create a page that would display the search results from searching with the URL...


404 Page Translation : Dev Questions & Vote - patriotmedia - 2011-05-27

Just a bump on this topic, because I came here looking for my 404 theme options. Can this little piece of info (add a 404 page with 404 slug) be added to the installation and setup Wiki? This is real important, and I don't think it's included.


404 Page Translation : Dev Questions & Vote - ccagle8 - 2011-05-27

sure it can be... you also have the ability to edit the wiki. If you are a member of the forum, you have access to edit the wiki.


404 Page Translation : Dev Questions & Vote - patriotmedia - 2011-05-27

ccagle8 Wrote:sure it can be... you also have the ability to edit the wiki. If you are a member of the forum, you have access to edit the wiki.

Great, didn't know that. Thanks!


404 Page Translation : Dev Questions & Vote - patriotmedia - 2011-05-27

As a follow-up... I see that this new 404 page is added to the sitemap when you auto-generate on the theme tab. Is there a way to exclude pages or not have this included? I know I can go in and manually remove it after generation and re-upload, but trying to keep it simple.


404 Page Translation : Dev Questions & Vote - ccagle8 - 2011-05-27

no, there isnt. we should add a check to remove 404.xml if it's found. I will make sure it gets in the code for 3.1


404 Page Translation : Dev Questions & Vote - yojoe - 2011-05-27

CC: how about adding a 404 page as a 2nd default page to GS installator ?
This way users would be able to edit its content just like index page.
And it would be hidden to for sitemap by default.


404 Page Translation : Dev Questions & Vote - ccagle8 - 2011-05-27

yojoe, its a good idea... i already copy it, but its not into the /data/pages folder...


404 Page Translation : Dev Questions & Vote - yojoe - 2011-05-28

ccagle8 Wrote:yojoe, its a good idea... i already copy it, but its not into the /data/pages folder...
yeah, until now it was a 404.xml in /other directory. And since mine earlier ideas haven't met with positive opinions, I thought that making 404 a hardcoded file available to be edited by end user right away, can be a good idea.
It's just about describing 404 file's purpose (may be inside its content).
Because it's a bit odd to have russian/chineese/spanish/etc. website with default english 404 page, as it is now.

And - lets face it - not many users looks into wiki or other guides to get additional benefits, until they run into certain problems.

ps.yeah, ingorance is a blessing Wink


404 Page Translation : Dev Questions & Vote - Connie - 2011-05-28

will this additional file be available for editing in the template-edit files-section?


404 Page Translation : Dev Questions & Vote - yojoe - 2011-05-28

Connie Wrote:will this additional file be available for editing in the template-edit files-section?
Rather as a normal page, like it is now (assuming you create 404 page manually) Wink