php-i18n Digest 11 Jan 2010 00:00:46 -0000 Issue 433

Topics (messages 1341 through 1349):

Problems passing variables to gettext
        1341 by: Marie-Aude
        1342 by: Hans-Peter Oeri
        1343 by: Marie-Aude
        1344 by: Hans-Peter Oeri
        1345 by: Marie-Aude
        1346 by: Hans-Peter Oeri
        1347 by: Marie-Aude
        1348 by: Marie-Aude

PMCÉú²ú¼Æ»®ÓëÎïÁÏ¿ØÖÆ
        1349 by: wvqjtce

Administrivia:

To subscribe to the digest, e-mail:
        [email protected]

To unsubscribe from the digest, e-mail:
        [email protected]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
Hello, I have a problem using gettext in php that I can't solve, I've been
through the different posts, and can't get it. 

I have a file of string variables for a site, like address, phone, etc, of
which one of them has to be translated. 
So I put in the variables.php file
$sitetitle= _('My beautiful site') ; 

Translated it in the po files (through PO edit)

Now in my index page, I set the locales, and call my variables. 
And I can't get $sitetitle to be translated, it still stays in the original
language (which means the variable is recognized, but not translated)

the echo _($sitetitle) does not work. 

Any idea ? 
-- 
View this message in context: 
http://old.nabble.com/Problems-passing-variables-to-gettext-tp26897598p26897598.html
Sent from the Php - Internationalization (i18n) mailing list archive at 
Nabble.com.


--- End Message ---
--- Begin Message ---
Hi!

Marie-Aude wrote:

> $sitetitle= _('My beautiful site') ; 
[...]
> the echo _($sitetitle) does not work. 

Are you actually trying to translate your site's title twice?

If not, gettext problems usually arise from not/wrongly setting the
domain and the path gettext is expecting. If you have a look at the
php manual for the gettext function, there is a complete example.

Greets
HPO

--- End Message ---
--- Begin Message ---
Hello :)

HPO wrote

> Marie-Aude wrote:

>> $sitetitle= _('My beautiful site') ; 
>[...]
>> the echo _($sitetitle) does not work. 

>Are you actually trying to translate your site's title twice?

>If not, gettext problems usually arise from not/wrongly setting the
>domain and the path gettext is expecting. If you have a look at the
>php manual for the gettext function, there is a complete example.

Actually no :) though it looks like. 
At first I had 
$sitetitle= _('My beautiful site') ; in variables.php
And echo $sitetitle in the second file, which is my template. 

As it did not work, I imagined the translation of the variable did not work
as non translated value was shown, and I tried to re-translate it. 
I tried both configurations (you know when you are despaired because you
can't grab why it does not work.
It is definitively not a path or configuration problem, because all other
strings are correctly translated. 
But the other strings are in other files, so this is the only case where I
define a variable that has to be translated.
--
Marie-Aude



--- End Message ---
--- Begin Message ---
Hi!

Lumiere de Lune wrote:

> $sitetitle= _('My beautiful site') ; in variables.php
> And echo $sitetitle in the second file, which is my template. 
> 
> As it did not work, I imagined the translation of the variable did not work

You mean the translation of the constant expression, whose result gets
assigned to a variable? There is no reason why the translation should
fail because of a (later) assignment of its result.

> But the other strings are in other files, so this is the only case where I
> define a variable that has to be translated.

Other files? Are you sure locale setting/domain/path are set for *this*
file, too?

Might $sitetitle be re-set after the translation assignment?

If not: Would it be possible to boil down a test case?

HPO

--- End Message ---
--- Begin Message ---
>You mean the translation of the constant expression, whose result gets
>assigned to a variable? There is no reason why the translation should
>fail because of a (later) assignment of its result.

Yes that's what I mean. And I agree there is no reason. 

>Other files? Are you sure locale setting/domain/path are set for *this*
>file, too?

Sorry again, I mis explained myself. 

I have 5 source files for the strings, all aggregated in one .pot, .po, .mo
file per locale. 
Obviously variables.php is not displayed directly. 
The four other ones are displayed in the browser, with strings directly in
the files, and variables from the variable.php
Everything works fine but this $sitetitle. 

>Might $sitetitle be re-set after the translation assignment?

Well that's one of the hypothesis, but if it was reset, the value in the
original language would not be shown would it ? And also there is basically
no reason, it's just a string, and it's used only for display. ('echo')

My initial guess was "problem is in .mo file", but I don't know how to check
it. 

>If not: Would it be possible to boil down a test case?
Yes I'm going to do it. Just have to change a few things to make it. 

-- 
View this message in context: 
http://old.nabble.com/Problems-passing-variables-to-gettext-tp26897598p26901564.html
Sent from the Php - Internationalization (i18n) mailing list archive at 
Nabble.com.


--- End Message ---
--- Begin Message ---
Hi!

Marie-Aude wrote:

> My initial guess was "problem is in .mo file", but I don't know how to check
> it. 

You would have to check the po - ensuring there actually is an entry for
your site's title and the translation is in there as well - and
recompile the mo from that.

If you're using GNU tools for the compilation, I doubt there will be any
problem in the mo.

HPO

--- End Message ---
--- Begin Message ---
Hi


Hans-Peter Oeri wrote:
> 
> You would have to check the po [...] - and
> recompile the mo from that.
> 

That's what I did of course. The string is there, and I use POEdit to
generate the .po and .mo files. 

-- 
View this message in context: 
http://old.nabble.com/Problems-passing-variables-to-gettext-tp26897598p26902236.html
Sent from the Php - Internationalization (i18n) mailing list archive at 
Nabble.com.


--- End Message ---
--- Begin Message ---
Ok, I think I found the solution. 

Which is actually in a totally different direction. 

The problematic string was added to the pot file, and I had to restart my
local server to have it taken into account. 
I read something about that in another forum. 

It sounds strange to me, as I never had to do that on my productive sites
(which anyway are shared environments), but obviously that was the problem
and it is solved. 

Sorry you spent some time on it, and on a false track, and thanks a lot for
your help. 
-- 
View this message in context: 
http://old.nabble.com/Problems-passing-variables-to-gettext-tp26897598p26902441.html
Sent from the Php - Internationalization (i18n) mailing list archive at 
Nabble.com.


--- End Message ---
--- Begin Message ---
[email protected]


          P M C 生 产 计 划 与 物 料 控 制 高 级 研 修 班

                时间:2010年01月14 -15日(上海)
                时间:2010年01月16 -17日(深圳)
--------------------------------------------------------------   
●对 象:生产总监、生产经理、生产计划相关人员、车间主任、物料主管
、采购主管及相关人员。

●课-程-简-介:
  各企业都期望低库存而能满足客户需求的流畅生产环境,以适应当今激
烈竞争微利时代。物料资金一般占企业营运资金55%~80%,而生产进度依时
完成,直接影响客户合作满意程度,鉴此,物料控制(俗称物控MC)和生产
控制(俗称生管PC),这个部门(PMC)掌握企业生产及物料运作的总调度和命
脉。直接涉及影响生产部、生产工程部、采购、货仓、品控部、开发与设
计部、设备工程、人力资源及财务成本预算控制等。生产及物料控制部门
和相关管理层必须充分了解:物料计划、请购、物料调度、物料的控制(收、
发、退、借、备料等)、生产计划与生产进度控制,并谙熟运用这门管理技
�X来解决问题。鼎志咨询的本课程是经过讲师十余年亲身体会揣摩凭感觉
和理论汇炼之精华。透过学员研讨和习作技能,帮助学员提升工作技能和
管理技巧。 
--------------------------------------------------------------  
●课-程-收-益:
◇建立制定完善的生产与物控运作体系
◇提升准时交货和降低库存成本 
◇预测及制定合理的短、中、长期销售计划
◇达成公司策略管理目标 
◇对自身的生产能力负荷预先进行详细分析并建立完善产品数据机制
◇协助公司建立产品工程数据
◇生产前期做好完整的生产排程和周生产计划
◇提高备料准确率,保持生产顺畅
◇配合生产计划做到良好物料损耗控制和备料
◇完善降低物料损耗机制和停工待料工时
◇对生产进度及物料进度及时跟进和沟通协调 
◇缩短生产周期,提高企业竞争力
--------------------------------------------------------------
●课-程-大-纲
一、销售计划/生产计划/物料计划协调接口管理
1)销售计划/生产计划角色和定位---订单总导演/总指挥
2)销售计划/生产计划/物料计划先进组织架构
◇东莞诺基亚公司销售计划/生产计划/物料计划组织架构
3)生产计划/物料控制五大职能----欠料分析跟进/备料功能/呆料预防
--处理
4)生产计划与销售业务链接流程
◇准时生产计划VS市场业务部VS客户“三赢”规则
◇中兴通讯销售计划/生产计划/物料计划接口职能图/资源图实例分析
◇美的滚动周计划负荷分析和三天生产计划不能变职能图
◇控制扦单、急单、补单/加单五种措施(范例)-----某公司
◇通过市场调查/信息反馈提高订单预测准确率三大做法
5)销售预测与主生产计划(MPS)与月/周生产计划/物料计划(MRP)链
接流程
◇销售预测/生产计划变化反馈和预测库存控制协调---销售预测微调制
度化降低预测库存成本原理分析
◇销售计划流程�D�D销售预测流程/销售计划流程/备货计划流程/生
产计划流程
6)制造业生产计划控制三种模式�D�D预期滚动计划系统/推进式(push)
生产控制系统/拉动式(pull)生产控制系统
◇世界五百强企业施耐德电气Schneider推进式生产控制系统
7)同一产品不同物流策略决定不同五大计划(销售/生产/物料/采购计/
库存计划)
◇华为计划管理手册分析

二、销售计划/生产计划控制流程(包括项目计划)
1)销售预测计划/生产计划控制流程七途径---讲师/学员点评某公司现
场诊断
◇提升编制销售预测计划编制准确性六大步骤
◇华润集团华晶销售预测计划编制六大步骤实例分析
◇青岛海尔新产品项目计划总体方案控制流程实例分析
◇西门子月/周/项目计划时间节点协调流程分析
◇富士康SAP系统主生产计划流程案例
◇大金空调计划控制流程ERP-ORACLE系统主界面实例分析
◇青岛海尔月/周/日项目计划协调流程实例分析
◇富士康集团(台湾)公司月度滚动产能负荷分析
◇三天生产计划不能变的滚动产能负荷分析实例分析
2)透过准时化生产机制解决订单频繁变更三种方法
◇顺德美的日用集团扦单、急单、补单/加单/生产计划紧急控制流程实
例分析
◇飞利浦扦单/急单计划紧急控制流程案例分析- Production plan cha
nge management
◇飞利浦生产查询界面、生产删改信息查询界面、产品工艺流程查询界
面、产品作业报表查询界面实例解析
3)生产计划控制管理(精益)模式---均衡化/柔性化拉动计划
◇准时化/均衡化生产方式(JIT)运用方法四大独特之处
◇准时化生产方式---柔性化与同步化与均衡化
◇某法国著名企业(拉动)一周生产计划不能变控制流程实例分析(现
场超市双箱广告牌拉动)
◇某公司拉动式生产计划控制流程实物图片系列分析
◇准时化生产方式双广告牌管理的基本原理解析
◇杭州博世(BOSCH)均衡化(拉动)一周生产计划板不能变(生产广
告牌)实例图片及说明分析
◇苏州某汽车配件公司三天均衡化生产计划板(生产广告牌)图片及说
明分析
◇在线半成品KANBAN计算 
◇负荷瓶颈库存量设定方法
◇飞利浦负荷瓶颈库存量设定实例―离散型生产模式

三、生产计划进度控制
1)缩短产品周期流程
◇西门子产品周期缩短流程价值流案例分享
◇某公司缩短产品周期电脑系统(用友)流程主界面实例分析
2)月/周生产计划产能连续滚动负荷分析制度化
◇中国某著名公司月度主排产计划制定十三依据
◇中国某著名公司三天生产计划依据制定九依据
3)月/周生产计划排程表制定与执行重点演练---上海某公司五张订单
月/周生产计划排程表制定个案演练
4)分析产能负荷七要素方面---人力负荷/机器负荷
◇广州某配件公司2007/04月产能负荷会实录文件分析
5)生产进度监控三个阶段---事前/事中/事后
◇如何统计分析生产数据
◇通过生产数据采集计算机系统图监控计划与进度---东莞某集团公司
6)协调沟通处理生产异常问题
◇八条改善措施(NCR goods management)
◇跨部门生产进度控制七步骤
7)飞利浦各部门异常工时/各部门产能损失图案例分析
◇生产能力效率表/综合效率分析
◇事后管理

四、物流计划跟进与存量管制
1、供货商交期管制十大之道-- lead time reduction 
◇伟创力(Flextronics)在物料欠料分析表实例分析
◇物料短缺八大原因和七种预防对策
2、物料管理相辅相成十四流程-- warehouse management
◇物料管理精髓三个盲点和八大死穴---伟创力美资公司呆料预防/处
理制度实例/工程更改流程分析
◇美的/一汽马自达公司/精工集团(日资)补料/损耗控制案例分析--
降低内循环成本
3.最新先进物流管理(精益)流程模式
◇物料管理---JIT三A政策六措施
◇深圳某著名台资企业(雷老师辅导)JIT供货推行十二步骤计划表实
例解析
1)内部物流配送管理流程解析--Internal logistic management 
◇格力空调JIT物料操作指导书解析--warehouse management
◇博世(BOSCH)现场利用电子标签发料实例分析
◇在线补充物料(RIP)KANBAN计算 
◇物料补充时间间隔计算
◇在线物料标识及KANBAN卡设计 
◇博世配送系统物料广告牌实物/图片实例分析
◇华晨宝马现场超市广告牌请购图片实例分析 
◇ABB/AREVA现场超市双箱广告牌请购图片实例分析
2)外部供应物流配送管理流程解析
◇通用汽车JIT供应商物流评审标准解析(SQE)
◇供应商管理库存(VMI)-某著名企业VMI协议实录分析
◇华强三洋供应商驻厂代表配送/退料/换料广告牌实物图片实例分析/
集货配送(Milk-Run)管理方法
◇供应商JIT直送工位管理方法/
◇使用条形码及与供货商进行电子数据交换(EDI)实例展示 
4、存量管制--inventory management
◇需求预测、物料计划与库存控制原理/四大策略
◇青岛海尔公司需求预测变化和库存相应调整控制流程实例
◇长虹采购订单模式实例分析----大陆标准/通用物料采购/海外lean 
time长物料采购
◇安全存量VS最高存量VS.最低存量定义
◇安全存量三种设定方法
◇ABC控制法--warehouse management
◇长周期采购批量、库存控制与销售预测的量变关系 
◇库存量降低五大方法
◇库存周转率定量计算
◇提高库存周转率的途径
◇深圳某实业有限公司物料周转速度/周转率/存料率实例
◇透过现场诊断和运用六种存量管制模式设置恰当库存管理方法(MTO 
/ROP/MOQ)降低外循环成本实例分析

◇尾声:当头棒喝―捅破窗纸:结合公司实际情况通过学员体会分享、
讲师点评、实践、活用所学五步
--------------------------------------------------------------
●讲师介绍:
   雷老师:香港理工大学MBA,香港生产力促进局特约讲师、美国管理学
会(AMA)授权专业培训师、清华大学/北京大学/中山大学EMBA班特邀实战
型讲师..北京时代光华签约...@师.2004/2005/2006年被培训论坛推誉为“
十大实战派培训师”、专业课程讲授专家、资深顾问.��任某大型日港合
资企业副总经理,拥有十几年的物料采购管理经验. 企业高层管理及课程
讲授经验非常丰富,讲授/辅导过4524家中外企业(至2006底)、融集中、
港、台多家企业经验之精华.并由北京大学出版《如何做好物料计划控制》
系列丛书和北京时代光华出版管理光盘,特别是2004/2005/2006年间定期
辅导顺德美的日用集团/富士康集团供应链管理项目(精益/JIT-生产/物料
计划/采购).“寓观念于谈笑间,蕴哲理于诙谐中”,风格生动、幽默,讲解
深入浅出或浅入深出,不仅案例丰富,且提供多种实用的解决问题之工具及
技巧.至今有四万九仟以上人次接受专业课程训练,其务实的作风深受厂
家好评如潮.
   曾经讲授及辅导过的企业有:青岛海尔,中国移动。中国北京联通。广
东移动。深圳华为。顺德/武汉美的空调.联想、南方电网。甘肃电力。长
江三峡电站。白沙集团。粤电集团、海南航空、上海日立.可口可乐.施耐
德����.上海松下半��体.西安杨森制药、苏州/上海西门子.����力(MULTE
K)/ 捷普科技(Jabil).蒙牛。河南思念食品。龙大食品集团.南京巴斯
夫。杭州/长沙博世。香港�L��集�F.东莞伟易达集团、加拿大北电.泰科
��子/卡西欧电子、上海米其林/固特异.雅居乐房地产.美赞臣。珠江啤酒、
步步高电子、格力空调.上海通用汽��.成都丰田。华晨宝马。海南马自达.
比亚迪汽��.长安汽��.郑州日产.北京ABB等多家知名企业,曾驻厂辅导(
部分名单)东莞诺基亚、北京索爱。惠州TCL、南京/成都爱立信、蒂森克
虏伯。华强三洋、三菱电机(广州)。四川长虹。苏泊尔 ,夏新电子.厦
华集�F.惠州德赛、飞利浦(上海)/苏州飞利浦、中兴通讯。武汉烽火科
技.中国长城计算机(深圳).东莞汤姆逊(电器). 顺德美的日用集团.阿波罗
卫浴。顺德乐华陶瓷(arrow). 迈瑞生物医疗。东莞伟易达。美泰玩具.恒
安纸业(心相印).森马。真维斯(旭日集团)香港启桓贸易行。溢达纺织
.晶苑制衣集团.东莞台�_��子. 富士康集�F.康佳集团等
---------------------------------------------------------------
●主办单位:中--培--信--息--网

●课程费用:2600元/人(包括教材、两天午餐、上下午茶点等)

●报名咨询:T E L: (0755) 6128 0152(深 圳)

●报名咨询:T E L: (0 2 1) 5108 3290(上 海)
----------------------------------------------------------------
                      [报  名  回  执  表] 

        F A X:(07 55) 61 28 01 53 或 (0 2 1) 51 08 32 96

我单位共___人报名参加2010年___月_____日在□上海、□深圳举办的:

【PMC生产计划与物料控制高级研修班】;

单位名称:_________________________________ 参会人数:_________人 

联系人:______________ 电 话:__________ 传 真:_________________

参会费用 ¥:__________元               邮 件:_________________

参 会 人:_____________________________________________________

付款方式: □1、现金 □2、转帐 □3、电汇

预订项目:□是、□否 住宿(请选择打“√”)

备注:请您把报名回执回传我司,��确保您报名无误,请您再次电话确认!

--- End Message ---

Reply via email to