首页 > 解决方案 > 我如何在 swiper.js 文件中编写阿拉伯语文本?PS:不在html输出文件中,而是在js脚本文件中

问题描述

var loopSteps = [ 
 { title: 'Locate', details: 'In a hurry just find a Loop near by you.' },
 { title: 'Scan', details: 'Scan the Loop with your mobile or type in your code to activate.' },
 { title: 'Ride', details: 'Fasten your helmet, hop on and start your journey' }
 ]

在这部分脚本中:我只想将阿拉伯语的详细信息文本显示在网页中。

标签: javascripthtmlcssarabicarabic-support

解决方案


修订:
将编辑器的编码设置为 utf-8。
dir- 额外的,如果你愿意的话。

原文,撤回:
<head>,添加:

<meta charset="UTF-8">

或者,更具体地说:

<meta charset="ISO-8859-6">

应该管用。
也许您想dir="rtl"在元素中使用,甚至在<body>标签中使用。整个页面将从右到左,包括表格单元格顺序和滚动条的一侧。

确保使用 utf-8 编码(不是 ansi 等)保存编辑器文件


推荐阅读