Init. language with Proteus

Hello

I’m looking to initialize the language of a base with proteus, is it possible?

Regards

You can do it with the tryton-admin command. It’s explained on our documentation.

Yes Sergi I know this command and use it usually, but there I would like to be able to initialize the language in the base by Proteus …

I looked at what the ‘trytond-admin’ command does, I think it is possible to do the part that initializes the language with Proteus. But I don’t know how to recover the language of the config file with Proteus.

You must set the ir.language as translatable then mark all activated modules to be updated and finally run the wizard ir.module.activate_upgrade.
But Issue 9172: Add language configuration wizard - Tryton issue tracker should simplify the task.

Thank you @ced, here is the piece of code (from a scenario) initializing the language (in french) of the database:

    >>> Lang = Model.get('ir.lang')
    >>> lang_fr, = Lang.find([('code', '=', 'fr')])
    >>> lang_fr.translatable = True
    >>> lang_fr.save()
    >>> Wizard('ir.module.activate_upgrade').execute('upgrade')

now I would like to recover the language from the configuration file … a suggestion?

It is stored in ir.configuration but it is not a public information.