How can I access language currently viewed in Views Customfield: PHP Code? I'm looking for a way to display some text in a view—information about who posted an article, and a link to read more—in a specific language based on which language for the site the user has selected.

I thought I'd do this with a "Customfield: PHP Code" to make an if statement echoing a string depending on the language.

How do I access this variable, or how do I solve the problem in another way?
The standard way to display text strings in Drupal is using the t() function. You should enter your text in English and it will be translated to the corresponding string in the current user's language.

If you still want to know the current user's language, you can load the user like this:

$user = user_load(uid);


and the language will be available on 

$user-&gt;language