Shopify Store-根据语言,右至左,从左到右的文字

发布于 2025-02-09 11:04:46 字数 160 浏览 2 评论 0原文

我有一家购物商店,我想改变语言方向。 我想创建一个支持阿拉伯语和英语语言的商店,我发现了几个可以进行翻译的应用程序,但是我的问题是: 我希望商店能够在我使用阿拉伯语时从左到右向右向右翻转其方向和文本,反之亦然,当我选择英语时, 有什么可以实现这一目标的东西吗? PS:我开始学习HTML 6个月前。 谢谢。

I have a Shopify store and I want to change the language direction.
I want to make a store that supports both Arabic and English languages, i found couple of apps that do the translation, but my problem is:
I would like the store to flip its direction and text from Left to right into Right to left whenever i'm using Arabic Language , and vice versa when i choose the English language,
is there something that can make this happen.
PS: I started learning HTML 6 months ago.
Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

油焖大侠 2025-02-16 11:04:47

最好的主意是使用支持这一点的主题。我相信那里有很多。

可能会有很多更改或适应的想法,但总的来说,

<style>
{% if localization.language.iso_code == 'ar' %}
 body {
     direction: rtl;
 }
{% endif %}
</style>

应该将其放在您的脑海中,接近您加载样式的位置。 (或者,如果您有一个.css.liquid文件,则)。

PS。我不确定您有iso_code,您可能需要在应用代码之前调试该值。

The best idea would be to use a theme that supports that. I believe there are many out there.

There could be manythings to change or adapt but in general what you should is

<style>
{% if localization.language.iso_code == 'ar' %}
 body {
     direction: rtl;
 }
{% endif %}
</style>

This should be put in your head close to where you load your style. (Or if you have a .css.liquid file, there).

PS. I'm not 100% sure about the iso_code you have, you might want to debug that value, before applying the code.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文