How do I get apt to download locale files when installing my program or through 'Language Support'?

Asked by Simen on 2012-03-19

I have successfully implemented translation (locale) support in my program Wind (https://launchpad.net/wind-transfer).
However I have to manully copy the wind.mo file to

'/usr/share/locale/[LANG_CODE]/LC_MESSAGES/',

 which is inconvenient for the end user(s).

So, how do I get apt to download the translation files to this folder?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Solved by:
mycae
Solved:
2012-03-21
Last query:
2012-03-21
Last reply:
2012-03-21
mycae (mycae) said : #1

You need to create a deb package, and as part of the debian/rules file, you need to install your .mo files during the install phase of the package.

mycae (mycae) said : #2

P.S. : you would also need to have your code in either a PPA, or fully in the ubuntu archive. The best way to do this would be to maintain your package in the debian archive, and await the ubuntu import.

Simen (simen-burud) said : #3

How do I set up the Debian/rules file?
(I'm currently using the 'quickly package' command.)

Best mycae (mycae) said : #4

Its not totally straightforwards, and can be a bit confusing the first time around.

the standard guide is here:
http://www.debian.org/doc/manuals/maint-guide/

but basically it involves making a .deb file using the debhelper tools

There is heaps of stuff on google, that you can find:
http://www.debian-administration.org/articles/336
http://www.linuxfordevices.com/c/a/Linux-For-Devices-Articles/How-to-make-deb-packages/

If you have a particular question, you can pop onto #debian-mentors on freenode IRC, or ask a question here.

Simen (simen-burud) said : #5

Thanks mycae, that solved my question.