It would be useful to add a variable for the language. Something like this:

function echo_themed_page($title, $content, $theme, $language = '') {
  $path = $language == '' ? '' : $language . '/';
  $path .= 'echo';
  $url = url($path, array('absolute' => TRUE));
...

For sending e-mail header and footer with language that is not a current site language.

CommentFileSizeAuthor
#3 1377632-add-language-parameter.patch826 bytesStevel

Comments

pillarsdotnet’s picture

Title: Add language choose » Add language parameter
Version: 6.x-1.8 » 8.x-1.x-dev
Assigned: MattMoody » pillarsdotnet

Good idea, but does the language choice always affect the URL in exactly that manner?

Stevel’s picture

Why not use the language option of the url function?

$url = url('echo', array('absolute' => TRUE, 'language' => $language));

Note (for the documentation) that the url function requires a language object and not a string.

Stevel’s picture

Status: Active » Needs review
StatusFileSize
new826 bytes

Added a proper patch.

Stevel’s picture

Issue summary: View changes

written errors corrected

Stevel’s picture

Any progress on this?