dsjj15012 2012-02-12 20:52
浏览 37

关于敏捷工具包的双语应用程序? 使用语言选择器?

I am planning on developing a bilingual PHP app with Agile Toolkit, with a language selector on every page ( French & English ) .. Can ATK4 accommodate this ? I am thinking yes .. but .. how would a newbie like me go about this with ATK4 ?? any cues would be greatly appreciated... I wish to create one single file ( some kind of database file that holds the translations) and access everything through variables for the various page views ( even the menu items ). Any assistance or cues on this will be greatly appreciated. thx

Don

  • 写回答

1条回答 默认 最新

  • doufu8127 2012-02-13 13:44
    关注

    PHP already have the localization function, and all you need to do is make sure that all the internal messages of Agile Toolkit is being routed through the localization function. Agile Toolkit's API contains a _() method too. You need to re-define it inside your "lib/Frontend.php" and route it either through the get text or SQL, whichever way you want.

    The other big part of translation you will need to perform is template translation. Templates usually contain graphics and texts which may be different depending on language. The "PathFinder" is ideal for this. Agile Toolkit website actually uses that technique for Polish translation:

    as you pass 3nd argument to the constructor, it instructs PathFinder to look into a different directory for the localized template files. If it does not find them there, it defaults to regular locations.

    评论

报告相同问题?

悬赏问题

  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程