• Hello,

    Any chance to be able to have error pages by language ? I’m using Polylang now and I can only have error pages in English.

    Thanks in advance !

    Didier.

Viewing 1 replies (of 1 total)
  • Plugin Author Jesin A

    (@jesin)

    Hi Didier,

    As of now this is not possible through the plugin. However you can use CSS to achieve this.

    Go to WP-Admin > Settings > Custom Error Pages, switch to the “Text” tab and enter error messages in all languages and wrap them in classes denoting their languages.

    Example:

    
    <div class="english-error">You don't have permission to access this resource</div>
    <div class="french-error">Vous n'avez pas la permission d'accéder à cette ressource</div>
    <div class="german-error">Sie haben keine Berechtigung, auf diese Ressource zuzugreifen</div>
    

    Then open the custom CSS editor for your theme and enter the following CSS:

    
    html:lang(en) .french-error,
    html:lang(en) .german-error {
        display: none;
    }
    
    html:lang(fr) .english-error,
    html:lang(fr) .german-error {
        display: none;
    }
    
    html:lang(de) .english-error,
    html:lang(de) .french-error {
        display: none;
    }
    

    You can use this solution for now while I try to make this plugin compatible with PolyLang.

Viewing 1 replies (of 1 total)
  • The topic ‘Translations possible ?’ is closed to new replies.