Internationalization Tapestry国际化-删除区域设置前缀
Tapestry在区域设置之间切换时自动向URL添加区域设置前缀:Internationalization Tapestry国际化-删除区域设置前缀,internationalization,tapestry,Internationalization,Tapestry,Tapestry在区域设置之间切换时自动向URL添加区域设置前缀: http://host/en/home http://host/es/home http://host/fr/home 等等。 如何避免;我在Tapestry APi中发现,您应该向AppModule类添加其他配置: configuration.add(SymbolConstants.ENCODE_LOCALE_INTO_PATH, "false"); 并自己使用LinkCreationListener2或LinkCreat
http://host/en/home
http://host/es/home
http://host/fr/home
等等。
如何避免;我在Tapestry APi中发现,您应该向AppModule类添加其他配置:
configuration.add(SymbolConstants.ENCODE_LOCALE_INTO_PATH, "false");
并自己使用LinkCreationListener2或LinkCreationListener(用于Tapestry<5.2*)。有人能提供更多的信息或例子吗?Thks这取决于您在跟踪区域设置方面想做什么。Tapestry 5.0使用cookie跟踪区域设置;Tapestry 5.1切换到将其编码到路径中。我认为这条路是正确的。。。毕竟,如果用户将该页面的法语版本添加到书签中,那么他们应该在一个月后使用书签时看到该页面的法语版本 计划:
- 将符号改写为“false”
- 向RequestHandler管道提供RequestFilter,该管道读取cookie以设置值
- 重写PersistentLocale服务以存储cookie
- 将符号改写为“false”
- 向RequestHandler管道提供RequestFilter,该管道读取cookie以设置值
- 重写PersistentLocale服务以存储cookie