Get all content on a “single page” site depending on language

WPML has a global to check for the language, though it might be outside the scope of WPSE because this is a commercial plugin.

It works like:

if (ICL_LANGUAGE_CODE == 'en'){
//do something like a custom query...
}else{
// do something else

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)