playSMS Forum

PlaySMS 1.4.2 changing language doesnt do anything

(Flashdown) #1

Hello together,

I am totally new to PlaySMS and have set up the latest official 1.4.2 of it on Debian Stretch using Apache2 and PHP 7.0 and Gammu-SMSD (may I switch later on to smstools, as there it did work to set the PIN in the config, but that’s another story, fixed it with a Shellscript for now that sends the PIN to the Device :D).

It seems to work nicely but it doesn’t matter which language I select in the Webinterface it remains in English and I would like to switch to german. I googled a lot and found Anton’s old suggestions which might be not up to date anymore, idk. So I tried the language packages and their dependencies from Ubuntu but it didn’t change anything so I removed them again, afterwards I tried to find something similiar so I gave the Debian Package locales-all a shot, same result. Would be great if somebody has a clue where this issue is comming from or how to solve it :slight_smile: .

I appreciate all the work that has been put into PlaySMS, I like it a lot so far :))

BTW: I also don’t like the Install as it is not a Debian package that can be “cleanly” installed and removed, so “I may” package PlaySMS later on for Debian Linux and share it, as it looks to good for not beeing packaged :).

Best regards,

(Emmanuel Chanson) #2

Hello Flashdown, I have the same issue and I think this is because we are using PHP 7.x.
I am investiguating the code to find what is going on.
I have a workaround in order to configure PlaySMS in your language. You should configure it in MySQL table:

mysql -u root -p****** playsms -e “update playsms_tblUser set language_module=‘fr_FR’ where username=‘admin’”

Hope it will help for the moment.
I have open a case few days ago with the same subject, I hope Anton will answer.


(Emmanuel Chanson) #3

I think I have found the solution.
I have commented the variable $lang_list = ‘’ on each following file and it works:

grep -r “lang_list = ‘’” /var/www/html/playsms/*

/var/www/html/playsms/plugin/core/main_config/main_config.php: //$lang_list = ‘’;
/var/www/html/playsms/plugin/core/site/site.php: //$lang_list = ‘’;
/var/www/html/playsms/plugin/core/user/user_config.php: //$lang_list = ‘’;
/var/www/html/playsms/plugin/core/user/subuser_mgmnt.php: //$lang_list = ‘’;
/var/www/html/playsms/plugin/core/user/user_mgmnt.php: //$lang_list = ‘’;

I was able to list and select languages on PlaySMS 1.4.2 + ¨PHP 7.2

(Flashdown) #4

Hey Emmanuel,

thank you for your suggestions, but unfortunately it didn’t work out for me.

The selection from the Webinterface is correctly reflected in the DB, so a manual SQL Statement was not required on my site as the values where already correct:

select username,language_module from playsms_tblUser;
| username | language_module |
| admin    | de_DE           |
| myseconduser   | de_DE           |
2 rows in set (0.00 sec)

I’ve also commented out the lines that overwrite the language list variable in those files and cleared my cookies as well, including trying to switch between languages multiple times, but I was not able to get a different language than english yet. Did you do something else as well? May u are using the Ubuntu language packs and the are still required?! I will try that once again. Oh, I just realized you are using php 7.2 where I use 7.0, so I may try an php upgrade to 7.3 before doing any other attempts as 7.2 is not provided through the Debian Repositories (may I try also 7.2 if 7.3 doesnt help), as it’s somehow hard to believe that it depends or still depends on those Ubuntu language packs. Nevertheless great finding with that hardcoded lang_list override in those scripts, even if I didn’t check what the for loop below it actually does :slight_smile: Let you know when I’ve checked it out.

(Flashdown) #5

So, I can now at least say something about PHP 7.3, the language selection in the webinterface doesn’t work, as the list is empty, on 7.0 it was possible to select a language in the Webinterface without an adjustment.

So, I did the same as you suggested and after that it is possible to select the language in PHP 7.3 but its not effective as on PHP7.0:

grep -r "lang_list = " /var/www/html/playsms/*
/var/www/html/playsms/plugin/core/user/user_mgmnt.php:          $lang_list = '';
/var/www/html/playsms/plugin/core/user/user_config.php:         $lang_list = '';
/var/www/html/playsms/plugin/core/user/subuser_mgmnt.php:               $lang_list = '';
/var/www/html/playsms/plugin/core/site/site.php:                $lang_list = '';
/var/www/html/playsms/plugin/core/main_config/main_config.php:          $lang_list = '';

So, now I will give PHP 7.2 a shot, to get closer to your setup. [Update]: Done, it’s exactly the same in 7.2 as with 7.3. So I’ve switched back to to 7.0

(Flashdown) #6


Just in case the lang packs from Ubuntu are still needed, could you do me a favor as I am a non Ubuntu User (Debian) and provide the output of the following command, as the language selection is working for you:
dpkg -l | grep lang

that would help me to see what is installed from these packages in your system and allows me to reproduce that on Debian for further testing, as I am not aware of the concept of .po files - how it works and what it’s requirements and dependencies are, I feel unable to make other approaches as long as I didn’t check out how that po stuff exactly works. And for now we know, it works on your system which is why I assume u are using Ubuntu. Can you confirm that?

(Emmanuel Chanson) #7

Unfortunately I am not using Ubuntu but CentOS_7. I dont have any lang pack to install on CentOS maybe the reason why I need po/mo file.

(Flashdown) #8

Well just found php-symfony-translation which also works with PO files comparing to this page:

Translation Source File Format

The Symfony Translation component supports lots of different translation formats: PHP, Qt, .po , .mo , JSON, CSV, INI, etc.

Can you crosscheck if you have symfony installed?