Translation for error pages

Discussion in 'General' started by variable99, Nov 22, 2023.

  1. variable99

    variable99 Member HowtoForge Supporter

    Any suggestion how to control this via API?
     
  2. pyte

    pyte Well-Known Member HowtoForge Supporter

    You can't "control" this. It is either set to this or that.
    There are however multiple ways to deal with this issues:
    • Change the error pages .html files manual with the correct files for the lanuage
    • Write a script that checks the customer lanuage set in the Database and overwrite the .html for all webspaces of the customer with the correct ones (This could cause loads of side effects without even thinking about it proper)
    • Create an Issue in the Git and hope that someday someone will change this/do it yourself and submit the patch upstream
    • Don't care at all and use english as it is an error message
     
    ahrasis and till like this.
  3. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Seems like hard work for just error pages though simpler solution in my mind for now is may be using some page translator like google. Ok, may not be so simple for some also.
     
  4. variable99

    variable99 Member HowtoForge Supporter

    Well, error pages matter. And my clientele is "old school" who loves to see everything in their native language :) .
    Probably off-topic, but I will ask it here: does ISPC have any "hook" system where can hook my desired logic upon website setup? I'am perfectly fine with bash.
     
  5. pyte

    pyte Well-Known Member HowtoForge Supporter

    There is a "Plugin" system in ISPConfig, but that will not work in this case.
    Fully automated the easiest solution would be what i already mentioned above:
    Grab all existing sites from the corrosponding database table. For each record check the client of the site an grab the language set for the client. May check if the default error page is used in the corrosponding folder. And then overwrite the error .html files in each webroot and change the permissions to the correct user and group.

    A lot of hassel for an error page in my opinion but thats up to you.
     
    ahrasis and variable99 like this.

Share This Page