2

Is there any drupal function to return the url with currently used language. Like: example.com/en

1 Answer 1

1

You can get the URL by using following code

global $language ;
$lang_name = $language->language ;

$url_current = $GLOBALS['base_url']/$lang_name;
4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.