What's new

Trying to change language from Japanese to English on ASUS RT-AC86U

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Try changing to the target directory first....
Code:
cd /jffs/scripts
then try the rename again.
Hey again. I've tried everything in a number of different combinations and I just must be doing something wrong. Whenever I reboot it just goes back to Japanese. I'll just keep that script handy whenever there's an update. I think I've used enough of your time! Thanks a lot.
 
Hey again. I've tried everything in a number of different combinations and I just must be doing something wrong. Whenever I reboot it just goes back to Japanese. I'll just keep that script handy whenever there's an update. I think I've used enough of your time! Thanks a lot.
Most of the time it might be because the jffs/custom config is not enabled properly. Just disable it -> reboot -> enable it (also tick "Format on next reboot") -> Apply -> Reboot.

And Martineau used "mv" command just to rename the script to services-start. So, obviously you should be in the same folder containing that script to rename it. If you're not familiar with command lines, try WinSCP, the best GUI program to manage files in terminal environment.
 
Last edited:
  • Like
Reactions: ika
Hey again. I've tried everything in a number of different combinations and I just must be doing something wrong. Whenever I reboot it just goes back to Japanese. I'll just keep that script handy whenever there's an update. I think I've used enough of your time! Thanks a lot.

Since the script files exist and can be manually executed correctly, without additional information it is difficult to understand how/why the language switch does not occur automatically during the boot.

As usual, you will need to check Syslog for related script execution errors.
Code:
grep "custom_script" /tmp/syslog.log

nvram get jffs2_scripts
 
  • Like
Reactions: ika
I think I got it!! Using WinSCP was a lot easier to look around in. Putting in those two pieces of code in the terminal created the file in the right spot. Renamed it. Then I had to click on the actual file to "execute." I'm not sure if that last part was exactly what did it but I rebooted a couple times and now it seems to be working. Not sure if it was 100% user error or not. But I learned some stuff and am happy with the router now!

Thank you so much Martineau and loveleeyoungae for your help!
 
Finally bit the bullet and implemented the dictionary replacement init-start script for my Japanese RT-AC88U. Works no problem and now I have the latest firmware loaded.
 
My router's web interface is contains only 5 languages EN, DA, SU, NO and JP (I think...). Router normally starts with english UI. I'm trying to set it to french. With the code bellow i can switch it to french but after reboot there is english GUI again.


Code:
mount -o bind   /www/FR.dict   /www/$(nvram get preferred_lang).dict

df

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root                34816     34816         0 100% /
devtmpfs                127744         0    127744   0% /dev
tmpfs                   127848      1716    126132   1% /tmp
/dev/mtdblock4           64256     17072     47184  27% /jffs
/dev/sda1             29887852   3237524  25132080  11% /tmp/mnt/RT-AC87W
<snip>
/dev/mtdblock4           64256     17072     47184  27% /www/FR.dict

service restart_httpd
Done.

After reading this topic i learned that i have to create a script that launches at booting. I'm not familiar with the command line. It seems i do something wrong.

SSH with two codes bellow not worked for me

Code:
echo -e "#!/bin/sh\nmount -o bind   /www/FR.dict   /www/\$(nvram get preferred_lang).dict\ndf\nservice restart_httpd\n" >/jffs/scripts/Dictionary_MSG.sh;chmod +x /jffs/scripts/Dictionary_MSG.sh

Code:
echo -e "/jffs/scripts/Dictionary_MSG.sh\n" >> /jffs/scripts/init-start;chmod +x /jffs/scripts/init-start

any hint for correct code?

Router ASUS RT AC87W
Firmware Merlin RT-AC87U_384.11_2
JFFS custom scripts and configs are enabled
 
Last edited:
Code:
echo -e "/jffs/scripts/Dictionary_MSG.sh\n" >> /jffs/scripts/init-start;chmod +x /jffs/scripts/init-start

any hint for correct code?

Apologies :oops:, the command to insert the call to map your chosen Dictionary during the boot process assumes that '/jffs/scripts/init-start' exists.

So to correct the issue, please enter the following to recreate the correct two-line init-start script (or use the routers nano editor to insert missing line)

First ensure that init-start doesn't exist, if it does, rename it.....
Code:
cd/jffs/scripts/

mv init-start init-start.bak

cat init-start

Now create the corrected init-start script:
Code:
echo -e "#!/bin/sh\n/jffs/scripts/Dictionary_MSG.sh\n" >> /jffs/scripts/init-start;chmod +x /jffs/scripts/init-start
and check that the init-start script contains two lines
Code:
cat init-start
and should now look like this:
Code:
#!/bin/sh
/jffs/scripts/Dictionary_MSG.sh
and has the correct attributes:
Code:
ls -lah init-start
 
Apologies :oops:, the command to insert the call to map your chosen Dictionary during the boot process assumes that '/jffs/scripts/init-start' exists.

So to correct the issue, please enter the following to recreate the correct two-line init-start script (or use the routers nano editor to insert missing line)

First ensure that init-start doesn't exist, if it does, rename it.....
Code:
cd/jffs/scripts/

mv init-start init-start.bak

cat init-start

Now create the corrected init-start script:
Code:
echo -e "#!/bin/sh\n/jffs/scripts/Dictionary_MSG.sh\n" >> /jffs/scripts/init-start;chmod +x /jffs/scripts/init-start
and check that the init-start script contains two lines
Code:
cat init-start
and should now look like this:
Code:
#!/bin/sh
/jffs/scripts/Dictionary_MSG.sh
and has the correct attributes:
Code:
ls -lah init-start

Thank you, it works now!
 
Hi ! I've got a brand new RT-AX3000 (japanese version of the RT-AX58U) purchased in Japan, and this feed has been much helpful for me to understand and change the default japanese language of my router. So thanks a lot to you all ! Merlin is also great, huge thanks to the developer !

Inspired by previous post and commands, I wrote a little script that allows me to change the user interface at anytime with a simple command and saved it as /jffs/scripts/set-webui-lang.sh
In case this might be interesting for someone, here is it.

Code:
#!/bin/sh

############################################################################
#
## Usage: set-webui-lang.sh [options] ARG1
## Changes the language of the router user interface
## Script designed for asuswrt-merlin
## Tested only on Asus RT-AX3000 with asuswrt-merlin v384.17
## Author : joomlafab
##
## Options:
##   -p            Provide a prompt to choose language
##                 ARG1 ignored if used
##
##   -q            Quiet mode, no messages echoed
##
##   -f            Reset the UI to original factory language
##                 ARG1 and -p ignored if used
##
## Arguments
##   ARG1          Language code (2 letters, case insensitive)
##                 If not provided, or provided ARG1 doesn't match
##                 an existing dictionnary, will apply DEFAULT_DICT
#
############################################################################

# Default dictionnary to use
DEFAULT_DICT="EN"

# Get the original factory language
FACTORY_DICT=$(nvram get preferred_lang)

# List all available dictionnaries
AVAILABLE_LANGUAGES=$(ls /www/ | grep dict | cut -d'.' -f1 | xargs | tr '\s' ', ')

# Get options
for param in "$@"; do
   case $param in
      -p)
         prompt=true
         ;;
      -q)
        quiet=true
        ;;
      -f)
         factory=true
         ;;
      *)
        if [[ -z "$inputDict" ]]; then
           inputDict=$(echo $param | tr 'a-z' 'A-Z' | grep -o -w -E '^[A-Z]{2}')
         fi
        ;;
   esac
done

############################################################################
#
#   log             - echo a log message if quiet mode wasn't set
#
############################################################################
log()
{
   if [[ -z "$quiet" ]] ; then
      echo "$1"
   fi
}

# Choose the proper dictionnary according to options
if [[ "$factory" = true ]]; then
   inputDict="$FACTORY_DICT"
elif [[ "$prompt" = true ]]; then
   echo "Available AVAILABLE_LANGUAGES : $AVAILABLE_LANGUAGES"
   while true; do
      read -p "Input the language code, then press Enter : " inputDict
      inputDict=$(echo $inputDict | tr 'a-z' 'A-Z' | grep -o -w -E '^[A-Z]{2}')
      dictFile="/www/$inputDict.dict"
      if [[ -n $inputDict ]] && [[ -f $dictFile ]]; then
         break;
      fi
      echo -e "Wrong language code.\nAvailable AVAILABLE_LANGUAGES : $AVAILABLE_LANGUAGES";
   done
elif [[ -z "$inputDict" ]]; then
   inputDict="$DEFAULT_DICT"
   log "No valid language code supplied."
   log "Applying default $DEFAULT_DICT dictionnary."
fi

# Verify that selected dictionnary exists
dictFile="/www/$inputDict.dict"
while [[ ! -f $dictFile ]]; do
   if [[ "$inputDict" = "$DEFAULT_DICT" ]]; then
      log "Cannot find default dictionnary $DEFAULT_DICT. No changes applied."
     exit;
   fi
   log "Cannot find $inputDict dictionnary.";
   log "Applying default $DEFAULT_DICT dictionnary."
   inputDict="$DEFAULT_DICT"
   dictFile="/www/$DEFAULT_DICT.dict"
done
log "Change user interface language to $inputDict."

# Unmount existing mounted dictionnaries
# Done in a loop because it seems possible to mount them several times
for mountPoint in $(mount | cut -d' ' -f3 | grep "/www/$FACTORY_DICT.dict"); do
   umount "$mountPoint"
done

# Mount selected language dictionnaries
if [[ "$inputDict" != "$FACTORY_DICT" ]]; then
   mount -o bind $dictFile "/www/$FACTORY_DICT.dict"
fi

# Restart UI
service restart_httpd > /dev/null

log "Done."
The script can be called to change the language with various options

Code:
# Call the script with a prompt to choose the language
/jffs/scripts/set-webui-lang.sh -p

Code:
# Call the script to set the webui to Language XX
# If wrong code, DEFAULT_DICT will be applied
# DEFAULT_DICT is set at top of the script
/jffs/scripts/set-webui-lang.sh XX

Code:
# Call the script to reset the webui to factory language
/jffs/scripts/set-webui-lang.sh -f

And I added the call to the script in /jffs/scripts/init-start whith this one-line command to setup my default user language at startup. Change "EN" to whatever available language you want to set up at startup

Code:
[[ ! -f /jffs/scripts/init-start ]] && echo -e "#!/bin/sh\n" > /jffs/scripts/init-start && chmod +x /jffs/scripts/init-start ; if ! grep -q "set-webui-lang.sh" /jffs/scripts/init-start; then echo -e "/jffs/scripts/set-webui-lang.sh -q EN\n" >> /jffs/scripts/init-start; fi

[EDIT] Minor modifications and comment to the script
 
Last edited:
Hi ! I've got a brand new RT-AX3000 (japanese version of the RT-AX58U) purchased in Japan, and this feed has been much helpful for me to understand and change the default japanese language of my router. So thanks a lot to you all ! Merlin is also great, huge thanks to the developer !

Inspired by previous post and commands, I wrote a little script that allows me to change the user interface at anytime with a simple command and saved it as /jffs/scripts/set-webui-lang.sh
In case this might be interesting for someone, here is it.

Code:
#!/bin/sh

############################################################################
#
## Usage: set-webui-lang.sh [options] ARG1
## Changes the language of the router user interface
## Script designed for asuswrt-merlin
## Tested only on Asus RT-AX3000 with asuswrt-merlin v384.17
## Author : joomlafab
##
## Options:
##   -p            Provide a prompt to choose language
##                 ARG1 ignored if used
##
##   -q            Quiet mode, no messages echoed
##
##   -f            Reset the UI to original factory language
##                 ARG1 and -p ignored if used
##
## Arguments
##   ARG1          Language code (2 letters, case insensitive)
##                 If not provided, or provided ARG1 doesn't match
##                 an existing dictionnary, will apply DEFAULT_DICT
#
############################################################################

# Default dictionnary to use
DEFAULT_DICT="EN"

# Get the original factory language
FACTORY_DICT=$(nvram get preferred_lang)

# List all available dictionnaries
AVAILABLE_LANGUAGES=$(ls /www/ | grep dict | cut -d'.' -f1 | xargs | tr '\s' ', ')

# Get options
for param in "$@"; do
   case $param in
      -p)
         prompt=true
         ;;
      -q)
        quiet=true
        ;;
      -f)
         factory=true
         ;;
      *)
        if [[ -z "$inputDict" ]]; then
           inputDict=$(echo $param | tr 'a-z' 'A-Z' | grep -o -w -E '^[A-Z]{2}')
         fi
        ;;
   esac
done

############################################################################
#
#   log             - echo a log message if quiet mode wasn't set
#
############################################################################
log()
{
   if [[ -z "$quiet" ]] ; then
      echo "$1"
   fi
}

# Choose the proper dictionnary according to options
if [[ "$factory" = true ]]; then
   inputDict="$FACTORY_DICT"
elif [[ "$prompt" = true ]]; then
   echo "Available AVAILABLE_LANGUAGES : $AVAILABLE_LANGUAGES"
   while true; do
      read -p "Input the language code, then press Enter : " inputDict
      inputDict=$(echo $inputDict | tr 'a-z' 'A-Z' | grep -o -w -E '^[A-Z]{2}')
      dictFile="/www/$inputDict.dict"
      if [[ -n $inputDict ]] && [[ -f $dictFile ]]; then
         break;
      fi
      echo -e "Wrong language code.\nAvailable AVAILABLE_LANGUAGES : $AVAILABLE_LANGUAGES";
   done
elif [[ -z "$inputDict" ]]; then
   inputDict="$DEFAULT_DICT"
   log "No valid language code supplied."
   log "Applying default $DEFAULT_DICT dictionnary."
fi

# Verify that selected dictionnary exists
dictFile="/www/$inputDict.dict"
while [[ ! -f $dictFile ]]; do
   if [[ "$inputDict" = "$DEFAULT_DICT" ]]; then
      log "Cannot find default dictionnary $DEFAULT_DICT. No changes applied."
     exit;
   fi
   log "Cannot find $inputDict dictionnary.";
   log "Applying default $DEFAULT_DICT dictionnary."
   inputDict="$DEFAULT_DICT"
   dictFile="/www/$DEFAULT_DICT.dict"
done
log "Change user interface language to $inputDict."

# Unmount existing mounted dictionnaries
# Done in a loop because it seems possible to mount them several times
for mountPoint in $(mount | cut -d' ' -f3 | grep "/www/$FACTORY_DICT.dict"); do
   umount "$mountPoint"
done

# Mount selected language dictionnaries
if [[ "$inputDict" != "$FACTORY_DICT" ]]; then
   mount -o bind $dictFile "/www/$FACTORY_DICT.dict"
fi

# Restart UI
service restart_httpd > /dev/null

log "Done."
The script can be called to change the language with various options

Code:
# Call the script with a prompt to choose the language
/jffs/scripts/set-webui-lang.sh -p

Code:
# Call the script to set the webui to Language XX
# If wrong code, DEFAULT_DICT will be applied
# DEFAULT_DICT is set at top of the script
/jffs/scripts/set-webui-lang.sh XX

Code:
# Call the script to reset the webui to factory language
/jffs/scripts/set-webui-lang.sh -f

And I added the call to the script in /jffs/scripts/init-start whith this one-line command to setup my default user language at startup. Change "EN" to whatever available language you want to set up at startup

Code:
[[ ! -f /jffs/scripts/init-start ]] && echo -e "#!/bin/sh\n" > /jffs/scripts/init-start && chmod +x /jffs/scripts/init-start ; if ! grep -q "set-webui-lang.sh" /jffs/scripts/init-start; then echo -e "/jffs/scripts/set-webui-lang.sh -q EN\n" >> /jffs/scripts/init-start; fi

[EDIT] Minor modifications and comment to the script
So you didn't like my original version?
 

It actually looks much better than mine !!! I didn't see/click the link to pastebin with the full script, my apologies. I read only the "quick and dirty" one line one, I guess I read too fast. That's why I thought I'd make something with a few more options for myself. Then once it was done I thought I'd share it.

If you want, you can replace my version with yours on the wiki. I really didn't mean to depreciate your work or be irrespectful, I just missed it...
 
It actually looks much better than mine !!! I didn't see/click the link to pastebin with the full script, my apologies. I read only the "quick and dirty" one line one, I guess I read too fast. That's why I thought I'd make something with a few more options for myself. Then once it was done I thought I'd share it.

If you want, you can replace my version with yours on the wiki. I really didn't mean to depreciate your work or be irrespectful, I just missed it...
No problem it's fine ;)

I'm terribly lazy when it comes to documentation, so appreciate you creating the Wiki.
 
Hello, I have a dumb question:

What if I rename JP.dict to JP.old and rename EN.dict to JP.dict?
With WinCSP ssh I cannot rename. I get the message "Read-only file system."
But I'm pretty sure I can rename using telnet (PuTTY).
Will it work? I need instructions on how to rename the above files on a telnet session.

Thank you.
 
Hello, I have a dumb question:

What if I rename JP.dict to JP.old and rename EN.dict to JP.dict?
With WinCSP ssh I cannot rename. I get the message "Read-only file system."
But I'm pretty sure I can rename using telnet (PuTTY).
Will it work? I need instructions on how to rename the above files on a telnet session.

Thank you.

You cannot make changes to the files, they are in read-only flash.
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top