【问题标题】:Php Symfony framework culture URLphp Symfony 框架文化 URL
【发布时间】:2011-01-17 14:49:01
【问题描述】:

我需要为不同的文化创建不同的 URL。

示例: localhost/trips 在完成文化中应该是 localhost/matkat,

但 localhost/trips 在完成文化中必须不可用。

在 routing.yml 中尝试过这样的配置,但没有成功

destination_zh: 网址:/旅行 参数:{模块:目的地,动作:索引} 要求:{ sf_culture: en }

【问题讨论】:

  • 两个问题:你大概有多少个网址?您如何生成 URL“slugs”(例如 matkat、trips 等)……这些是动态的吗?

标签: php symfony1


【解决方案1】:

在 Symfony 插件仓库中有一个 i18n 路由插件:http://www.symfony-project.org/plugins/zxI18nRoutingPlugin

【讨论】:

    猜你喜欢
    • 2011-05-08
    • 1970-01-01
    • 1970-01-01
    • 2011-08-13
    • 1970-01-01
    • 1970-01-01
    • 2012-01-16
    • 2011-08-03
    相关资源
    最近更新 更多