[英]i18next + wordpress - custom path for the /locales folder
Is there any way i can pass a custom path for the i18next
call? 有什么方法可以传递
i18next
调用的自定义路径? It searches for the locales
folder in the site root. 它在站点根目录中搜索
locales
文件夹。 But if i'm using it in a WordPress plugin, i must pass a custom path with my plugin folder url, due wordpress structure. 但是,如果我在WordPress插件中使用它,我必须通过我的插件文件夹url(由于wordpress结构)传递自定义路径。
I don't know of a way... but why would you want to? 我不知道有什么办法……但是你为什么要呢? WordPress itself provides a way to localize JS through wp_localize_script() .
WordPress本身提供了一种通过wp_localize_script()本地化JS的方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.