Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamically change language #1040

Closed
akirapix opened this issue May 23, 2016 · 2 comments
Closed

Dynamically change language #1040

akirapix opened this issue May 23, 2016 · 2 comments

Comments

@akirapix
Copy link

@akirapix akirapix commented May 23, 2016

Hello,
is there a way to set language 'externally', for example passing a variable in url parameters?
I basically wrapped rainloop in a page and i'd like to set language per user
Thanks

@RainLoop
Copy link
Owner

@RainLoop RainLoop commented May 23, 2016

Fast answer in No.

But, you may do it by using SSO functionality

<?php

// Enable RainLoop Api and include index file 
$_ENV['RAINLOOP_INCLUDE_AS_API'] = true;
include '/var/www/rainloop/index.php';

$ssoHash = \RainLoop\Api::GetUserSsoHash('user@yourdomain.com', 'super-password', array(
    'Language' => 'ru_RU'
));

// redirect to webmail sso url
\header('Location: http://yourdomain.com/rainloop/?sso&hash='.$ssoHash);

Unfortunately. it doesn't work right now (additional language parameter), but it will be fixed in the next version.

RainLoop added a commit that referenced this issue May 23, 2016
@RainLoop
Copy link
Owner

@RainLoop RainLoop commented Jun 4, 2016

This code should work in the last version.

@RainLoop RainLoop closed this Jun 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants