Giter Club home page Giter Club logo

ph7cms-test-gettext-lang's Introduction

Test Gettext Lang

The script will allow you to test quickly, debugging easily and much easier than with pH7CMS if Gettext is correctly installed or not.

It will check for the French language (fr_FR), but you can change this easily by changing the locale folder and the locale constant.

Prerequisites

  • PHP 5.4 or higher
  • Gettext properly installed
    • sudo apt-get install gettext (Debian / Ubuntu)
    • sudo apt-get install php-gettext (Debian / Ubuntu)
    • sudo apt-get install locales (Debian / Ubuntu)

How It Works?

In a lot of cases (even when Gettext is installed on the server), Gettext won't work for some reason (and this is not caused by pH7CMS!) To check if it is correctly installed or to debug if Gettext is not working, please play with this script.

In most cases when it failed, it's because the OS (the system of the server) doesn't recognised the locale (the language) set by Gettext

How To Install the missing locale (language) on my server?

For Ubuntu and other OS based on Debian, you can see what languages (locales) are installed on the OS (server) by typing locale -a in your terminal.

If you don't find the language of your Gettext translation, you will have to install the locale for your language so the server will reconize the language of your site.

For the example, it will be French (as this script uses French locale). If French is not the language you need, you will have to change it to yours (e.g., ru_RU for Russian, es_ES for Spanish, it_IT for Italian, de_DE for German, nl_NL for Dutch, ...).

  • sudo locale-gen fr_FR
  • sudo locale-gen fr_FR.UTF-8
  • sudo dpkg-reconfigure locales

Website

pH7CMS

Author

Pierre-Henry Soria

Contact Me

By email at: phy [AT] hizup [D0T] uk or at: ph7software [AT] gmail [D0T] com

ph7cms-test-gettext-lang's People

Contributors

ph-7 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.