Page 1 of 2
tis-arduino package in French
Published: Dec 4, 2023 - 2:15 PM
by gaelds
Hello,
is it possible to install Arduino in French directly, or to configure it after installation? I can't find anything in the registry...
Re: tis-arduino package in French
Published: Dec 4, 2023 - 3:38 PM
by blemoigne
Hello,
Here is a good idea (source:
https://support.arduino.cc/hc/en-us/art ... rduino-IDE):
you can edit the preferences.txt file directly.
Close Arduino IDE.
Open the Arduino15 folder.
Open preferences.txt.
Find the editor.languages.current line.
Edit the value to read editor.languages.current=en.
Save the file.
Open Arduino IDE to see the changes.
Re: tis-arduino package in French
Published: Dec 4, 2023 - 3:46 PM
by gaelds
I couldn't find a preferences.txt file in the Arduino installation folder. But I just discovered that it's located in C:\Users\<user> \.arduinoIDE\arduino-cli.yaml which is modified.
I wanted to try this code:
Code: Select all
def session_setup():
## Changement de langue du logiciel vers français
settings_arduino = makepath(user_home_directory(),'.arduinoIDE','arduino-cli.yaml')
with open(settings_arduino, "rt") as file:
x = file.read()
with open(settings_arduino, "wt") as file:
x = x.replace("locale: en", "locale: fr")
fin.write(x)
But the ".arduinoIDE" folder is only created after the software is launched for the first time, so session_setup won't do anything... And what's more, my code is incorrect; I end up with an empty arduino-cli.yaml file

Re: tis-arduino package in French
Published: Dec 7, 2023 - 10:47
by Benoit
Good morning,
Why not use a while loop? For example, something like this:
Code: Select all
import os
def session_setup():
try : # pour la gestion des erreurs
## Changement de langue du logiciel vers français
file_exist = False # initialise la variable file_exist
settings_arduino = makepath(user_home_directory(),'.arduinoIDE','arduino-cli.yaml')
while not file_exist: # boucle qui recommence tant que file_exist n'est pas vrai
if os.pah.exists(settings_arduino): # vérifie si le fichier de configuration existe
with open(settings_arduino, "rt") as file:
x = file.read()
with open(settings_arduino, "wt") as file:
x = x.replace("locale: en", "locale: fr")
fin.write(x)
file_exist = True
print("Le fichier arduino-cli.yaml a été mis à jour )
else :
file_exist = False # renvoi false à la variable file_exist sir le fichier n'éxiste pas
except Exception as e:
print(f"L'erreur suivante s'est produite : {e}")
As for modifying the configuration file, I preferred to use a third-party script in AutoIt:
Code: Select all
#include <FileConstants.au3>
#include <File.au3>
#include <StringConstants.au3>
Local $file_path = @UserProfileDir & "\.arduinoIDE\arduino-cli.yaml"
Local $yaml_file = @UserProfileDir & "\.arduinoIDE\arduino-cli.yaml"
Local $proxy_line = "proxy: ********************"
Local $file_exists = False
While (Not $file_exists)
If FileExists($file_path) Then
$file_exists = True
; Boucle pour tester si le proxy est présent
While StringInStr(FileRead($yaml_file), $proxy_line) = 0
; Ajout du proxy
FileWriteLine($yaml_file, "network:")
FileWriteLine($yaml_file, " proxy: **************************")
Sleep(1000) ; Attendre 1 seconde
WEnd
Else
Sleep(1000) ; Attendre 1 seconde
EndIf
WEnd
Regards,
Re: tis-arduino package in French
Published: Dec 12, 2023 - 12:11
by dcardon
Hello everyone,
@gaelds I tested modifying the arduino-cli.yaml file automatically, but it doesn't seem to have any impact (but I can confirm that this file is indeed modified when there's a change in the GUI, but there are lots of other things that are copied at the same time too...
@Benoit, using autoit is not recommended; the Python part allows you to handle exceptions and other scenarios.
@Benoit, using a while loop is not recommended because it's more error-prone (in case of exceptions, etc.)
After spending half an hour with this software, I'm rather appalled by the poor (or nonexistent) packaging. The system-wide installation is a joke; the software copies everything into the user directory on first launch, a bit like:
- a little bit in %HOMEPATH%/.arduinoIDE
- a little bit in %APPDATA%\roaming\arduino IDE
- a little bit in %APPDATA%\roaming\arduino-ide
- a lot in %APPDATA%\local\Arduino15 (>400MB)
- a lot in %APPDATA%\local\arduino-ide-updater (>130MB, just for the updater which we didn't originally want...)
And of course it doesn't work in AppLocker or SRP environments (as some say, "security is for the weak", they've clearly never seen ransomware at Arduino...).
There is no global configuration file, and the driver pre-loading is unreliable to say the least; blocking automatic updates should be included in a future version...
I have a colleague at the office who installed it on his son's machine yesterday (a recycled PC), the installation and launch took more than ten minutes, he went straight back to the latest version 1.x.
In short, I think Arduino does not want to be deployed in schools.
Sincerely,
Denis
Re: tis-arduino package in French
Published: Dec 18, 2023 - 10:56 AM
by Geoffroy
I can confirm, our school uses it and we had to implement a GPO. A real nightmare...
Re: tis-arduino package in French
Published: Dec 18, 2023 - 3:38 PM
by dcardon
Hi Geoffroy,
if this is a GPO for the initial Arduino 2 configuration, could you explain how you set up your GPO? Perhaps we could use session_setup()? I haven't been able to do it consistently, so if you have the details of the steps involved, I'd appreciate it

!
Best regards,
Denis
Re: tis-arduino package in French
Published: March 6, 2025 - 5:11 PM
by olaplanche
I'm sharing my SRP-compatible arduino-ide package, with auto-update disabled and French as the default language:
Prerequisites:
* Configure the software in French for the first time, then copy the folder below to the root of the package:
C:\Users\%username%\AppData\Roaming\arduino-ide\Local Storage\leveldb
* Create an unrestricted SRP on the folder "%AllUsersProfile%\Arduino15"
Code: Select all
# -*- coding: utf-8 -*-
from setuphelpers import *
import platform
"""
Usable WAPT package functions: install(), uninstall(), session_setup(), audit(), update_package()
"""
# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls
bin_name_string = 'arduino-ide_%s_Windows_64bit.msi'
def install():
# Declaring local variables
package_version = control.get_software_version()
bin_name = bin_name_string % package_version
all_user_data = makepath(programdata,'Arduino15')
# Installing the software
install_msi_if_needed(bin_name,
properties='/qn ALLUSERS=1',
timeout=1200
)
print('Restricting permissions on %s' % all_user_data)
if not isdir(all_user_data):
mkdirs(all_user_data)
run(r'icacls "%s" /t /grant *S-1-5-21-3299883279-2723331061-yyyyyyyyyy-xxxx:(OI)(CI)M' % all_user_data) # groupe AD ELEVES (Get-ADGroup -Identity ELEVES | select Name, SID)
run(r'icacls "%s" /t /grant *S-1-5-21-3299883279-2723331061-yyyyyyyyyy-xxxx:(OI)(CI)M' % all_user_data) # groupe AD PROFESSEUR (Get-ADGroup -Identity PROFESSEUR | select Name, SID)
print('Add Windows Firewall rules')
add_netfirewallrule(r"Arduino IDE", r"C:\program files\Arduino-IDE\Arduino IDE.exe", profile="Domain")
add_netfirewallrule(r"mdns-discovery", r"C:\ProgramData\arduino15\packages\builtin\tools\mdns-discovery\1.0.9\mdns-discovery.exe", profile="Domain")
# Installing Arduino IDE user settings
print('Copying Arduino IDE user settings to %s' % all_user_data)
copytree2("leveldb","%s\leveldb" % all_user_data)
def session_setup():
import tempfile
# Declaring local variables
all_user_data = makepath(programdata,'Arduino15')
# Set Arduino CLI language fr and librairies/data/downloads paths
pathfile = makepath(tempfile.gettempdir(),'arduino-cli.yaml')
currentuser = get_current_user()
configpath = makepath(r'c:\users',currentuser,'.arduinoIDE')
datafile = r"""board_manager:
additional_urls: []
daemon:
port: "50051"
directories:
builtin:
libraries: C:\ProgramData\Arduino15\libraries
data: C:\ProgramData\Arduino15
downloads: C:\ProgramData\Arduino15\staging
user: C:\Users\%s\Documents\Arduino
library:
enable_unsafe_install: false
locale: fr
logging:
file: ""
format: text
level: info
metrics:
addr: :9090
enabled: true
output:
no_color: false
sketch:
always_export_binaries: false
updater:
enable_notification: false
""" % currentuser
fichier = open(pathfile, "w")
fichier.write(datafile)
fichier.close()
mkdirs(configpath)
filecopyto(pathfile,configpath)
remove_file(pathfile)
# Disable Update Notification
pathfile = makepath(tempfile.gettempdir(),'settings.json')
currentuser = get_current_user()
configpath = makepath(r'c:\users',currentuser,'.arduinoIDE')
datafile = r"""{
"window.titleBarStyle": "native",
"arduino.checkForUpdates": false
}
"""
fichier = open(pathfile, "w")
fichier.write(datafile)
fichier.close()
mkdirs(configpath)
filecopyto(pathfile,configpath)
remove_file(pathfile)
# Set Arduino IDE language fr
leveldbpath = makepath(r'c:\users',currentuser,'AppData','Roaming','arduino-ide','Local Storage','leveldb')
if not isdir(leveldbpath):
mkdirs(leveldbpath)
copytree2("%s\leveldb" % all_user_data,leveldbpath)
def uninstall():
print('Uninstalling all_user_data')
remove_tree(makepath(programdata,'Arduino15'))
print('Uninstalling Windows Firewall rules')
remove_netfirewallrule("Arduino IDE")
remove_netfirewallrule("mdns-discovery")
Sincerely
Re: tis-arduino package in French
Published: March 6, 2025 - 7:30 PM
by vcardon
Olivier, when are you coming to work with us?

Re: tis-arduino package in French
Published: March 7, 2025 - 2:01 PM
by olaplanche
When I get tired of my current position, I'll let you know
