How do you change the language of the service?


(Anton Raharja) #1

Continuing the discussion from PlaySMS and integrating users from an AD, adding contacts through .csv and group management:


(Anton Raharja) #2

to activate language you need to install language-pack in your server

for example in Ubuntu and you want to support id_ID then you need to install language-pack-id and then restart webserver (eg: apache2):

apt-get install language-pack-id
service apache2 restart

read this for translation:
https://github.com/antonraharja/playSMS/blob/master/documents/TRANSLATE.md

anton


(Robin Karlsen) #3

So if I’d want to install the danish playsms translation I’d write

apt-get install language-pack-da_DK ? Cause if that’s the case I get the error “Unable to locate package language-pack-da_DK”


(Anton Raharja) #4

da_DK supports came from language-pack-da, how do I know this ? I googled.

So please try:

apt-get install language-pack-da

anton


(Robin Karlsen) #5

So let me get this straight, you have all the translations needed in the .po/.mo files but you are still dependant on an external (I presume) “official” language pack from ubuntu? Why would that be the cause? All the translations are stored locally on the files that came with the install. I don’t get why you’d need something external then.

Anyways cheers.


(Anton Raharja) #6

It is how to do it when you work with po files, gettext

Browse around for more info about this.

anton


(Robin Karlsen) #7

Alright, fair enough, I have no experience with translating actual language packs, I’ll look into it further.

Quick question before I look around though: I now installed the norwegian language pack for ubuntu, all I have to do now in order to get a functional norwegian language pack is to simply edit the .po files locally stored in the language folders as nb_NO (copied from en_US)?

After translations I wouldnt mind giving support for it and adding it to the official packages if you’d like that.


(Anton Raharja) #8

Please go through the link above, TRANSLATE.md

you can create new pack of language for playSMS, and then translate just inside the po files, then share with us so that we can (I can) assist you on compiling the po files

pot file is po template file, po files are containing translation texts, mo files are compiled po files, mo files are the actual files required for translation.

anton


(Robin Karlsen) #9

How would you like the files? You want me to just copy the entire plugin folder so you can access them one by one like that, or would you like me to seperately get each message.po file?


(Anton Raharja) #10

that is why I asked you to review the TRANSLATE.md so that you know how to create new language, using which script to create new language

after finished editing your new language you can backup the language using a script provided in playSMS too

share that backup file with us

please, take time, like 3 days, to actually read TRANSLATE.md and test the script

anton


(Robin Karlsen) #11

Ok, I’ll read it properly now (only skimmed through it previously), sorry for that.

I’ve now ran the create-new-language script and I’ve started to translate.

On a sidenote: I’d appreciate if you could give a reply when you can in the other thread, it seems like group codes don’t actually support UTF8?

EDIT: ok done with plugin/language and plugin/gateway, two more folders to go!


(Robin Karlsen) #12

Hey there, I’m done with the translation and I’m trying to get it to work on the actual server.

I’ve ran the ‘./3-regenerating-mo-files.sh /var/www/playsms’ to regenerate the .mo files, what else do I need to do?

Adding the backup files for you so you can add the norwegian translation on the release!
playsms-language-nb_NO.tar.gz (19.2 KB) playsms-language-nb_NO-backup.tar.gz (26.4 KB)


(Anton Raharja) #13

I opened the tar.gz but I found no translation (just skim it, not actually read all of them), which file have you translated ?

anton


(Robin Karlsen) #14

Hm, I’ll double check, but I’m fairly sure I went through all files


(Anton Raharja) #15

ah sorry, wrong file, I open the other one, yes, the backup file contains lots of translation

I will add this on your behalf

anton


(Robin Karlsen) #16

Cool, do you know how I can activate it on my end though? As it doesnt show for me, Ive regenerated the files to get the .mo files


(Anton Raharja) #17

I add stuffs in plugin/language/nb_NO, check them out in github

main config:

anton


(Robin Karlsen) #18

Looking good, do you have any clue why the language option doesnt pop up for me in the menu? Is there anything else I need to run other than the regenerate script?


(Anton Raharja) #19

you need to add some stuffs, I already add them, you can view them in github

just pull the latest and see them

anton


(Robin Karlsen) #20

Alright, will do that then