You are not logged in.

#1 2023-01-27 08:28:35

abdullah_faik
Member
Registered: 2023-01-27
Posts: 9

add second language

Hi guys, I  am trying to add Arabic as the second language
so i made this steps
1) i uncomment the arabic from locale file
then i generate config file by this command

locale-gen

then i moved to /usr/share/X11/xkb/rules/ and open base.lst to choose arabic layout and toggle
then i runned this command

 localectl --no-convert set-x11-keymap ara,us pc105 ,dvorak grp:alt_shift_tggle 

and alse this one

 localectl --no-convert set-x11-keymap ar,us pc105 ,dvorak grp:alt_shift_tggle 

but in two caces it doesn't work
but we i try this command

 setxkbmap ar 

it change to arabic but i can't back to english so what can i do ?

Offline

#2 2023-01-27 08:54:53

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,805

Re: add second language

setxkbmap -layout ara,us -variant ',dvorak' -o grp:alt_shift_tggle
setxkbmap -print -query

"locale-gen" is for the output locale, as a sanity check:

localectl
locale -a
locale

Offline

#3 2023-01-27 17:05:12

abdullah_faik
Member
Registered: 2023-01-27
Posts: 9

Re: add second language

it works but still the toggle doesn't work
i can't use shortcut to change the input language sad
so i need to remove arabic layout to write in engilsh then add it wo write in arabic

Offline

#4 2023-01-27 17:11:04

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,805

Re: add second language

Didn't pay enough attention when copypasting.

-o grp:alt_shift_tggle

is obviously wrong, try

-o grp:alt_shift_toggle

Offline

#5 2023-01-28 04:19:35

abdullah_faik
Member
Registered: 2023-01-27
Posts: 9

Re: add second language

this the final code

setxkbmap -layout ara,us -variant 'qwerty' -option grp:alt_shift_toggle

Offline

#6 2023-01-28 07:44:06

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,805

Re: add second language

Passing that to localectl should get you an xorg configlet so you won't have to run it manually.
You can also use "qwerty,dvorak" as variants.

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

#7 2024-10-03 20:40:06

W1S3_F001
Member
Registered: 2024-10-03
Posts: 1

Re: add second language

awesome! thanks for the instructions,
for the newbies: your locale.gen is in etc, so to access it you `sudo nano /etc/locale.gen`

Offline

#8 2024-10-03 20:58:03

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,805

Re: add second language

1. please don't necrobump
2. this thread isn't about locale.gen, the OP struggled w/ keyboard layouts
3. no you most certainly don't run "sudo nano" => https://man.archlinux.org/man/sudo.8.en

Offline

Board footer

Powered by FluxBB