Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 08-11-2011, 01:03 PM   #1
tikismoke
Junior Member
tikismoke began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2011
Device: galaxy tab
Question Calibre-server language

Hi all and thank's for this very nice soft.

I've got some mistakes with the web interface:
-When launching from a command-line (Debian user) the web page is in french (That's nice).
-When creating a /etc/init.d/calibre-server script the web page is in english.

/usr/bin/calibre-server --with-library /home/user/Livres/ -p 8888 --daemonize

Somebody know how to change this?
tikismoke is offline   Reply With Quote
Old 08-11-2011, 01:22 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,347
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Copy ~/.config/calibre to /root/.config/calibre
kovidgoyal is online now   Reply With Quote
Advert
Old 08-11-2011, 03:23 PM   #3
tikismoke
Junior Member
tikismoke began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2011
Device: galaxy tab
Thank's
I don't have a ~/.config/ since it's a fresh debian re-install on a knew server without any user for the moment.
Différents is when starting it from init.d and from root shell.
tikismoke is offline   Reply With Quote
Old 08-11-2011, 04:39 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,347
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The language is read from a stored configuration file, if one os not present it is autodected from your environments LANG/LC_* variables. Set LANG correctly in your init file.
kovidgoyal is online now   Reply With Quote
Old 08-12-2011, 12:45 PM   #5
tikismoke
Junior Member
tikismoke began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2011
Device: galaxy tab
root@serveurter:/home/user# locale
LANG=fr_FR.UTF-8
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=

But still not in french when using init.d script.

I've tried to add this the samething in the ini.d file but it did'nt change anything.
tikismoke is offline   Reply With Quote
Advert
Old 08-12-2011, 12:48 PM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,347
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The environment for processes launched via the init system is not the same as that for a login session. You need to get the correct environment setup for your init scripts. How to do that is distro dependent.
kovidgoyal is online now   Reply With Quote
Old 08-12-2011, 12:55 PM   #7
tikismoke
Junior Member
tikismoke began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2011
Device: galaxy tab
It's a Debian.

And once again thank you very much for your help.

In case i'm using this script:
Quote:
#! /bin/sh
### BEGIN INIT INFO
# Provides: calibre
# Required-Start: network
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts the Calibre Content Server
# Description: Starts the calibre-content daemon, a Web server
#
### END INIT INFO

# Author: Glenn Beer
#
# Please remove the "Author" lines above and replace them
# with your own name if you copy and modify this script.

# Do NOT "set -e"

# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Calibre Content Server"
CONTENT=/home/user/Livres/
NAME=calibre-server
DAEMON=/usr/bin/$NAME
PIDFILE=/var/run/$NAME.pid
DAEMON_ARGS="--with-library=$CONTENT -p 8888 --pidfile=$PIDFILE --daemonize"
SCRIPTNAME=/etc/init.d/$NAME

# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0

# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME

# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh

# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions

#
# Function that starts the daemon/service
#
do_start()
{
# Return
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null || return 1

start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS || return 2
}

#
# Function that stops the daemon/service
#
do_stop()
{
# Return
# 0 if daemon has been stopped
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred

start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
RETVAL="$?"
[ "$RETVAL" = 2 ] && return 2

# Wait for children to finish too if this is a daemon that forks
# and if the daemon is only ever run from this initscript.
# If the above conditions are not satisfied then add some other code
# that waits for the process to drop all resources that could be
# needed by services started subsequently. A last resort is to
# sleep for some time.

start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
[ "$?" = 2 ] && return 2

# Many daemons don't delete their pidfiles when they exit.
rm -f $PIDFILE
return "$RETVAL"
}

#
# Function that sends a SIGHUP to the daemon/service
#

case "$1" in
start)
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
do_start
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
stop)
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
status)
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
restart)
#
# If the "reload" option is implemented then remove the
# 'force-reload' alias
#
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
case "$?" in
0|1)
do_start
case "$?" in
0) log_end_msg 0 ;;
1) log_end_msg 1 ;; # Old process is still running
*) log_end_msg 1 ;; # Failed to start
esac
;;
*)
# Failed to stop
log_end_msg 1
;;
esac
;;
*)
#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $SCRIPTNAME {start|stop|status|restart}" >&2
exit 3
;;
esac

:
tikismoke is offline   Reply With Quote
Old 08-12-2011, 02:03 PM   #8
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,347
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I'm not a debian user, so I can't help you with modifying that script. You should ask on a debian forum.

All you need to do, is set one of the following environment variables so the server process sees them (in order)

CALIBRE_OVERRIDE_LANG
LANGUAGE
LC_ALL
LC_CTYPE
LC_MESSAGES
LANG
kovidgoyal is online now   Reply With Quote
Old 08-12-2011, 03:01 PM   #9
tikismoke
Junior Member
tikismoke began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2011
Device: galaxy tab
Thank's for all.

Hope there where an option to define language easily.

Maybe in a next release
tikismoke is offline   Reply With Quote
Old 09-10-2011, 09:52 AM   #10
tikismoke
Junior Member
tikismoke began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2011
Device: galaxy tab
Don't know why but with the last version:Release: 0.8.18 [09 Sep, 2011]
With the same starting script, the web page is now in french.

The OPDS is also in french.
tikismoke is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre language change? mago55 Calibre 8 11-16-2020 01:49 AM
Calibre Content Server and Windows Home Server 2011 HughMcC Calibre 8 10-01-2014 07:26 AM
Calibre Viewer Dictionary Change Language Welderman Introduce Yourself 8 01-12-2011 05:09 AM
Multi language support via Calibre Jim77 Calibre 4 02-12-2010 02:46 PM
Calibre 0.54, What language is it working in? estral Calibre 15 04-02-2009 11:30 AM


All times are GMT -4. The time now is 04:59 AM.


MobileRead.com is a privately owned, operated and funded community.