Anope IRC Services

Anope Support => 2.0.x/1.9.x Support => Topic started by: Nanar on April 06, 2020, 02:56:38 AM

Title: language by default
Post by: Nanar on April 06, 2020, 02:56:38 AM

Hi,

How to do, to decide that Anope speak, for exemple, in french by default ?

Thank you !
Title: Re: language by default
Post by: Lord255 on April 06, 2020, 08:08:32 AM
hi,
hints: https://wiki.anope.org/index.php/2.0/FAQ
Q: Where is the selection for <my language>?

also, if you fixed, here is how to set the default:
https://github.com/anope/anope/blob/0d0763f72f52945a91b610d61729d658dafedfc1/data/example.conf#L542-L556
Title: Re: language by default
Post by: Nanar on April 06, 2020, 12:56:18 PM

 Thank you for your help,

Nickserv alway answer to me wen I do "/msg nickserv help set language" :
supported languages:
en_US (English)

1. I'v just installed french language on VPS server, but I don't understand the utility because I think that the important thing is to select this languages in service.conf, no ? I restart Unrealircd, rehash Unreal ircd, rehash Anope.

2. In service.com of Anope it's like that :
defaultlanguage = "fr_FR.UTF-8"

3. There's on VPS server:
/home/anope/anope-2.0.7-source/language/anope.fr_FR.po


How to do ?

Sincerly
Title: Re: language by default
Post by: CrazyCat on April 07, 2020, 08:12:59 AM
Did you edit the block:
Code: [Select]
/*
         * A list of languages to load on startup that will be available in /nickserv set language.
         * Useful if you translate Anope to your language. (Explained further in docs/LANGUAGE).
         * Note that english should not be listed here because it is the base language.
         *
         * Removing .UTF-8 will instead use the default encoding for the language, eg. iso-8859-1 for western European languages.
         */
        languages = "fr_FR.UTF-8 fr_FR"
Title: Re: language by default
Post by: Nanar on April 09, 2020, 09:46:08 AM
 Thank you for your nice answer, yes I did !

    languages = "ca_ES.UTF-8 de_DE.UTF-8 el_GR.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 hu_HU.UTF-8 it_IT.UTF-8 nl_NL.UTF-8 pl_PL.UTF-8 pt_PT.UTF-8 ru_RU.UTF-8 tr_TR.UTF-8"

    defaultlanguage = "fr_FR.UTF-8"

The answer of nickserv :
Changes the language Services uses when sending messages to you (for example, when responding to a command you send) language should be chosen from the following list of supported languages: n_US (English)

And the problem is always there !
Title: Re: language by default
Post by: CrazyCat on April 09, 2020, 10:44:33 AM
3. There's on VPS server:
/home/anope/anope-2.0.7-source/language/anope.fr_FR.po

Have you /home/anope/services/locale/fr_FR/ (or whatever your install directory is) ?
Title: Re: language by default
Post by: Nanar on April 09, 2020, 11:31:31 AM
 It's there :
/home/anope/anope-2.0.7-source/language/anope.fr_FR.po

There's :
/home/anope/services

But in services there is not :
/locale/fr_FR/


In services there's only :
bin
conf
data
lib
logs

Title: Re: language by default
Post by: CrazyCat on April 09, 2020, 12:08:02 PM
As someone said on IRC, first install locales on your VPS and then recompile your services.
Title: Re: language by default
Post by: Nanar on April 09, 2020, 01:29:23 PM

 Thank you. Could you tale me What are locales ?
Title: Re: language by default
Post by: CrazyCat on April 09, 2020, 01:48:29 PM
If using debian (or ubuntu or any debian-based OS): dpkg-reconfigure locales
Title: Re: language by default
Post by: Joel on April 12, 2020, 02:43:55 PM
Hello,
On my server the language is Portuguese as I show below.

rede-irc@mail:~$ env | grep LANG
LANG=pt_PT.UTF-8
rede-irc@mail:~$

and the language is always in English, I don't understand why
Title: Re: language by default
Post by: Nanar on April 12, 2020, 04:26:18 PM
 I did this on root but not in Anope folder : "As someone said on IRC, first install locales on your VPS and then recompile your services.".

Now it's always in english, but I'v things in two languages in this exemple, it's strange :

ChanServ takes ops from Titi
ChanServ gives owner to Titi
ChanServ donne le statut d'ops à Titi

And nickserv answer when I do /msg nickserv help set language :
supported languages:
en_US (English)
Only.

And other idea CrazyCat ?
Title: Re: language by default
Post by: Joel on April 13, 2020, 07:05:02 PM
I did this on root but not in Anope folder : "As someone said on IRC, first install locales on your VPS and then recompile your services.".

Now it's always in english, but I'v things in two languages in this exemple, it's strange :

ChanServ takes ops from Titi
ChanServ gives owner to Titi
ChanServ donne le statut d'ops à Titi

And nickserv answer when I do /msg nickserv help set language :
supported languages:
en_US (English)
Only.

And other idea CrazyCat ?


The command I did, it was just to know which language was standard on the server, it is the language I want but it always keeps on giving English
Title: Re: language by default
Post by: Joel on April 13, 2020, 10:14:13 PM
I already changed the lucales
As I show below

root@mail:/home/services/services/bin# env | grep LANG
LANG=pt_PT.UTF-8
root@mail:/home/services/services/bin#

   configured pt_PT.UTF-8 in services.conf

already recompiled
and the services will continue in English: /

can you help me?
Title: Re: language by default
Post by: CrazyCat on April 20, 2020, 01:35:15 PM
Install gettext.
Code: [Select]
apt-get install gettextThen, recompile.

cf https://github.com/anope/anope/blob/2.0/docs/LANGUAGE
Title: Re: language by default
Post by: Nanar on April 20, 2020, 06:03:59 PM

 Merci pour ta réponse.
Cela a réglé le problème.