Translating custom cPanel plugin

manoaratefy

Well-Known Member
Nov 17, 2018
49
4
8
Madagascar
cPanel Access Level
Root Administrator
Good morning,

I'm looking to make my own custom cPanel plugin available in multiple languages. I've seen that cPanel already have a locale/language selection system. So:

1. How to get the current running language in my PHP plugin?
2. How to translate icon name (in the install.json generated through WHM)?

Thanks in advance.