UnamWebPanel icon indicating copy to clipboard operation
UnamWebPanel copied to clipboard

Hi how can i add more supported language

Open h09s opened this issue 2 years ago • 8 comments

i quite don't understand how to add more supported languages and afgter iam done i can do pull request so you could add those languages

h09s avatar Nov 04 '23 23:11 h09s

You can add new language translations to this file: https://github.com/UnamSanctam/UnamWebPanel/blob/master/UnamWebPanel/lang/lang.php, there are some other things as well such as adding it into the config and such but I can do that part.

UnamSanctam avatar Nov 05 '23 02:11 UnamSanctam

would it be easier to do in the .json via database ?

h09s avatar Nov 05 '23 13:11 h09s

You can add your translated texts however you want and I can then add them correctly into the web panel.

UnamSanctam avatar Nov 05 '23 13:11 UnamSanctam

You can add your translated texts however you want and I can then add them correctly into the web panel.

you should make in wiki how to add more languages by yourself

h09s avatar Nov 05 '23 14:11 h09s

just tell me how to and i can do it myself

h09s avatar Nov 05 '23 14:11 h09s

You add the translated language texts into this file https://github.com/UnamSanctam/UnamWebPanel/blob/master/UnamWebPanel/lang/lang.php, for example in the 'Settings' translation you would add your own at the end: 'Settings'=>['en'=>'Settings', 'sv'=>'Inställningar', 'fr'=>'Options', 'de'=>'Einstellungen', 'pl'=>'Ustawienia', 'ru'=>'Настройки', 'uk'=>'Налаштування', 'es'=>'Ajustes', 'langcode'=>'Your Translation'], And you would change the langcode to whatever the language code (ISO 639-1) of your translation language is and then Your Translation to your translated text.

UnamSanctam avatar Nov 05 '23 14:11 UnamSanctam

so it would be like this ?

'Settings'=>['en'=>'Settings', 'sv'=>'Inställningar', 'fr'=>'Options', 'de'=>'Einstellungen', 'pl'=>'Ustawienia', 'ru'=>'Настройки', 'uk'=>'Налаштування', 'es'=>'Ajustes', 'lt'=>'Nustatymai'],

h09s avatar Nov 05 '23 14:11 h09s

Yes that is correct.

UnamSanctam avatar Nov 05 '23 14:11 UnamSanctam