Ticket #3375 (closed Feature Requests: fixed)

Opened 3 years ago

Last modified 2 years ago

Default Language

Reported by: chocho Assigned to:
Priority: minor Milestone: 2.8
Component: Languages / Translation Version: 2.5-branch
Keywords: Cc:
Confirmation: Need testing SVN Revision (if applicable):
Backend Engine: All Backend Engine Version:

Description

If language is changed and close the browser, next time you login in FreePBX language is switched to English. It will be nice if this change stay permanently, until you decide to do this.
Thanks.

Change History

(follow-up: ↓ 2 ) 11/05/08 16:47:06 changed by mbrevda

isnt there a cookie that sets this? perhaps it should also be configurable from the admin panel...

(in reply to: ↑ 1 ) 11/05/08 17:30:39 changed by chocho

Yes, there is a cookies, but they expires in end of the session. Your second suggestion was better :)

11/05/08 19:20:46 changed by p_lindheimer

  • confirmation changed from Unreviewed to Need testing.

see if this solve the issue:

Index: views/freepbx_admin.php
===================================================================
--- views/freepbx_admin.php     (revision 7088)
+++ views/freepbx_admin.php     (working copy)
@@ -139,7 +139,9 @@
    if (extension_loaded('gettext')) {
        if (!isset($_COOKIE['lang'])) {
            $_COOKIE['lang'] = "en_US";
-       } 
+       } else {
+           setcookie("lang", $_COOKIE['lang'], time()+365*24*60*60);
+       }
 ?>
    
      

11/06/08 02:24:30 changed by chocho

Yes, it works now. It gives on cookie validation for a year.
Thank You!

11/06/08 02:41:24 changed by chocho

But this solution is for the current computer. If you need for some reason to use another computer ?

11/06/08 09:58:23 changed by p_lindheimer

chocho,

that is correct it is per computer. The majority of user's who use FreePBX share accounts, typically having a single admin account, so I don't think setting it up by user is ideal. You are welcome to make a feature code request to be considered, that would apply a default language setting as part of the Administrator login information, and would be the default assuming a cookie is not found with something different.

And, it's reasonable to request a different default then english in the case of no cookie. I guess that is what mbrevda was suggesting. If you make that request, please do so as a separate ticket since they would be handled differently.

For now we'll look at adding this into at least 2.6 and maybe back ported to 2.5.

11/06/08 12:36:32 changed by chocho

Thanks Philippe,
I think that current change is enough for now. And I wasn't consider the things that you pointed.
I'll make that feature request, but don't think now is a time. Maybe when User Portal is on the road, I'll do that.

06/13/09 16:58:27 changed by mickecarlsson

  • status changed from new to closed.
  • resolution set to fixed.

(In [7813]) Fixes #3375 set expiration time for the language cookie to one year

01/05/10 17:44:12 changed by p_lindheimer

(In [8560]) Merged revisions 7771-7912,7914-8559 via svnmerge from http://svn.freepbx.org/freepbx/branches/2.5

........

r7782 | mickecarlsson | 2009-05-30 11:32:36 -0700 (Sat, 30 May 2009) | 1 line

Adds charset and emailsubject to vm_email.inc so that the text can be localized using utf-8

........

r7808 | mickecarlsson | 2009-06-09 22:14:19 -0700 (Tue, 09 Jun 2009) | 1 line

Fixed spelling errors

........

r7813 | mickecarlsson | 2009-06-13 14:58:27 -0700 (Sat, 13 Jun 2009) | 1 line

Fixes #3375 set expiration time for the language cookie to one year

........

r7818 | mickecarlsson | 2009-06-14 08:59:00 -0700 (Sun, 14 Jun 2009) | 1 line

Fixed spelling error in Swedish translation for core

........

r7902 | mickecarlsson | 2009-07-29 09:26:59 -0700 (Wed, 29 Jul 2009) | 1 line

Closes #3699, adds Ukranian language to ARI. Thank you Oleh

........

r7912 | p_lindheimer | 2009-08-02 18:44:47 -0700 (Sun, 02 Aug 2009) | 1 line

allow freepbx_debug to print objects also

........

r7914 | p_lindheimer | 2009-08-02 18:48:28 -0700 (Sun, 02 Aug 2009) | 3 lines

Initialized merge tracking via "svnmerge" with revisions "1-7913" from http://svn.freepbx.org/freepbx/branches/2.6

........

r8119 | mickecarlsson | 2009-08-24 12:37:31 -0700 (Mon, 24 Aug 2009) | 1 line

Fixed spelling error

........

r8120 | mickecarlsson | 2009-08-24 12:39:12 -0700 (Mon, 24 Aug 2009) | 1 line

Closes #3756 updated French language for amp. Thank you medialsace

........

r8161 | mickecarlsson | 2009-08-25 11:47:28 -0700 (Tue, 25 Aug 2009) | 1 line

Closes 3707 removes unnecessary debug output of static information

........

r8300 | p_lindheimer | 2009-09-05 18:55:46 -0700 (Sat, 05 Sep 2009) | 1 line

update 2.5 to jQuery 1.3.2

........

r8301 | p_lindheimer | 2009-09-05 18:56:54 -0700 (Sat, 05 Sep 2009) | 1 line

update jQuery in view

........

r8302 | p_lindheimer | 2009-09-05 18:58:21 -0700 (Sat, 05 Sep 2009) | 1 line

update libreepbx.javascript.js with update jQuery, and build tool

........

r8315 | p_lindheimer | 2009-09-05 19:36:02 -0700 (Sat, 05 Sep 2009) | 1 line

Auto checkin packed libfreepbx.javascripts.js as part of build process

........

r8316 | p_lindheimer | 2009-09-05 19:36:11 -0700 (Sat, 05 Sep 2009) | 1 line

Creating release 2.5.2

........

r8348 | p_lindheimer | 2009-09-08 15:55:32 -0700 (Tue, 08 Sep 2009) | 1 line

created 2.5.2 in wrong branch, adding it 2.5 so properly version info is returned

........

03/09/10 02:15:19 changed by chocho

Hi, This works on FreePBX 2.5, but not on next releases - 2.6 and 2.7

03/09/10 08:59:37 changed by p_lindheimer

this bug is closed. If this is a regression please open a new 'bug' ticket. Thanks.

03/09/10 15:06:19 changed by mickecarlsson

  • status changed from closed to reopened.
  • resolution deleted.

Yes, the change was "lost". Re-opening ticket as a reminder for me to really fix it.

03/09/10 17:37:16 changed by p_lindheimer

  • milestone changed from 2.6 to 2.8.

03/10/10 01:17:38 changed by mickecarlsson

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [9108]) Fixes (again) #3375

03/10/10 12:15:06 changed by p_lindheimer

(In [9115]) fixes #4109, fixes #3375 (regressed) merge r9108, r9109, r9110 from trunk

03/16/10 21:05:03 changed by p_lindheimer

(In [9252]) Merged revisions 9070-9113,9115-9251 via svnmerge from http://svn.freepbx.org/freepbx/branches/2.7

........

r9115 | p_lindheimer | 2010-03-10 10:15:05 -0800 (Wed, 10 Mar 2010) | 1 line

fixes #4109, fixes #3375 (regressed) merge r9108, r9109, r9110 from trunk

........

r9212 | p_lindheimer | 2010-03-14 08:52:36 -0700 (Sun, 14 Mar 2010) | 1 line

update existing manager.conf file with new permissions, this will need to be added to a 2.7.1 version but at least new framework upgrades will catch this when it is next published

........