UnamSanctam / UnamWebPanel

MIT License
164 stars 61 forks source link

Hi how can i add more supported language #292

Open FrazeDev opened 8 months ago

FrazeDev commented 8 months ago

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

UnamSanctam commented 8 months ago

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.

FrazeDev commented 8 months ago

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

UnamSanctam commented 8 months ago

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

FrazeDev commented 8 months ago

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

FrazeDev commented 8 months ago

just tell me how to and i can do it myself

UnamSanctam commented 8 months ago

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.

FrazeDev commented 8 months ago

so it would be like this ?

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

UnamSanctam commented 8 months ago

Yes that is correct.