How do you change the language of the service?

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

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

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”

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

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.

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

Browse around for more info about this.

anton

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.

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

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?

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

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!

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)

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

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

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

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

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

main config:

anton

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?

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

just pull the latest and see them

anton

Alright, will do that then