Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apex support multiply language[apex] ¥100 #18

Closed
qiaofeng1227 opened this issue May 9, 2022 · 4 comments
Closed

apex support multiply language[apex] ¥100 #18

qiaofeng1227 opened this issue May 9, 2022 · 4 comments
Assignees
Labels
feature Type label, New feature or request

Comments

@qiaofeng1227
Copy link
Contributor

qiaofeng1227 commented May 9, 2022

offical install

test access apex container to confirm, it seems has multiply language,how to set?

bash-4.2# ls
ar  da	el  f4000.sql  f4050.sql  f4300.sql  f4411.sql	f4500.sql  f4600.sql  f4700.sql  f4850.sql  fi	fr-ca  hr  it  ko  no  pt     ro  sk  sr       sv  tr	  zh-tw
cs  de	es  f4020.sql  f4155.sql  f4350.sql  f4470.sql	f4550.sql  f4650.sql  f4750.sql  f4900.sql  fr	he     hu  ja  nl  pl  pt-br  ru  sl  sr-latn  th  zh-cn
bash-4.2# cd ..

image

@qiaofeng1227 qiaofeng1227 added the feature Type label, New feature or request label May 9, 2022
@qiaofeng1227 qiaofeng1227 self-assigned this May 9, 2022
@xyt52 xyt52 transferred this issue from Websoft9test/docker-apex Oct 19, 2022
@xyt52 xyt52 changed the title apex support multiply language apex support multiply language[apex] Oct 19, 2022
@chendelin1982
Copy link
Contributor

chendelin1982 commented Nov 27, 2022

官方方案:在 apex 中运行 /opt/oracle/apex/22.1.0/builder/zh-cn/load_zh-cn.sql 这个脚本即可载入中文

apex 中没有发现 sqlplus 客户端,导致无法运行 sql 脚本。不过安装了另外一个工具 SQLcl 替代 sqlplus (path: /opt/oracle/sqlcl/bin/sql)

cd /opt/oracle/apex/22.1.0/builder/zh-cn
NLS_LANG=Chinese_Chinese.AL32UTF8
# conn_string sys/$DB_ORACLE_PASSWORD@oracledb:$DB_ORACLE_PORT/${DB_ORACLE_PDB} as sysdba
/opt/oracle/sqlcl/bin/sql  sys/UGz0IARz117ssO%@apex-db:1521/xepdb1 as sysdba

image

image

@chendelin1982 chendelin1982 changed the title apex support multiply language[apex] apex support multiply language[apex] ¥100 Nov 27, 2022
@Tooy1011
Copy link
Contributor

Tooy1011 commented Dec 1, 2022

判断容器是否开启,相关文件是否存在后载入中文

#!/bin/bash
while ( ! [ -n $(docker ps -q -f "name=^apex$") ] )
do
        echo "starting..."
        sleep 2
done

sudo docker exec -it apex /bin/bash -c "
dirpath="/opt/oracle/apex/22.1.0/builder/zh-cn"
filename="/opt/oracle/sqlcl/bin/sql"
while ( [ ! -d "$dirpath" ] && [ ! -e "$filename" ] )
do
        echo "starting......"
        sleep 2
done"
echo "startup complete"
echo "begin to load chinese..."
export password=$(grep "db_oracle_password" /credentials/password.txt|awk -F ": " '{print $2}')
sudo docker exec -it apex /bin/bash -c "      
cd /opt/oracle/apex/22.1.0/builder/zh-cn
NLS_LANG=Chinese_Chinese.AL32UTF8 
/opt/oracle/sqlcl/bin/sql -S sys/"$password"@apex-db:1521/xepdb1 as sysdba @/opt/oracle/apex/22.1.0/builder/zh-cn/load_zh-cn.sql
"
echo "finished"

@Tooy1011
Copy link
Contributor

Tooy1011 commented Dec 2, 2022

#!/bin/bash
while ( ! [ -n $(docker ps -q -f "name=^apex$") ] )
do
        echo "starting..."
        sleep 2
done

sudo docker exec -it apex /bin/bash -c "
dirpath="/opt/oracle/apex/*/builder/zh-cn"
filename="/opt/oracle/sqlcl/bin/sql"
while ( [ ! -d "$dirpath" ] && [ ! -e "$filename" ] )
do
        echo "starting......"
        sleep 2
done"
echo "startup complete"
export password=$(grep "apex_db_oracle_password" /credentials/password.txt|awk -F ": " '{print $2}')
echo "begin to load chinese..."
sudo docker exec -it apex /bin/bash -c "      
cd /opt/oracle/apex/*/builder/zh-cn
NLS_LANG=Chinese_Chinese.AL32UTF8 
echo exit | /opt/oracle/sqlcl/bin/sql sys/"$password"@apex-db:1521/xepdb1 as sysdba @load_zh-cn.sql
"
echo "finished"

@Tooy1011
Copy link
Contributor

Tooy1011 commented Dec 5, 2022

#!/bin/bash
status="000"
echo "starting......"
while [ $status == "000" ]
do
        status=$(curl -IL -m 5 -s -w "%{http_code}\n" -o /dev/null "localhost:9001")
        sleep 20
done
sleep 10
status=$(curl -IL -m 5 -s -w "%{http_code}\n" -o /dev/null "localhost:9001")
echo "$status"
echo "startup complete"
echo "begin to load chinese..."
password=$1
export password
sudo docker exec apex /bin/bash -c "
cd /opt/oracle/apex/*/builder/zh-cn && NLS_LANG=Chinese_Chinese.AL32UTF8 && echo exit | /opt/oracle/sqlcl/bin/sql sys/"$password"@apex-db:1521/xepdb1 as sysdba @load_zh-cn.sql
"
echo "finished"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Type label, New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants