Yii Framework Forum: Multi language apps with Yii - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Multi language apps with Yii Rate Topic: -----

#1 User is offline   Saraa 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 25-August 10

  Posted 25 August 2010 - 11:51 PM

Hi,
I know this sounds stupid but as I'm new to Yii and PHP framework I'd like to ask this..

By using language support in Yii, can we automatically translate any text that is displayed in default English (loaded from database) into some other language like Japanese?

Or else do we have to write predefined values for each English terms used in the site?
Thanks.
0

#2 User is offline   Bater.Makhabel 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 14
  • Joined: 26-August 10
  • Location:China

Posted 26 August 2010 - 01:09 AM

View PostSaraa, on 25 August 2010 - 11:51 PM, said:

Hi,
I know this sounds stupid but as I'm new to Yii and PHP framework I'd like to ask this..

By using language support in Yii, can we automatically translate any text that is displayed in default English (loaded from database) into some other language like Japanese?

Or else do we have to write predefined values for each English terms used in the site?
Thanks.




you can refer babelfish in the joomla, i think we can port it to yii...
My Site
WWW.BULAKH.COM
WWW.KAMKOR.COM
WWW.MAMUO.COM
WWW.META4ALL.COM
0

#3 User is offline   mech7 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 220
  • Joined: 26-March 09

Posted 26 August 2010 - 06:16 AM

use Yii:t for strings and you can also use the language id as dir in your view ;) For db translations you are on your own.. there are some models there that extend activerecord.. but so far i am just using a 1 to 1 relation to the translation table :) a little more heavy as it selects both fields... but easy to use.
0

#4 User is offline   Shahcheraghean 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 207
  • Joined: 12-December 12
  • Location:Iran-Mashhad

Posted 05 March 2013 - 10:17 AM

View Postmech7, on 26 August 2010 - 06:16 AM, said:

use Yii:t for strings and you can also use the language id as dir in your view ;)
...


Hi there. may i ask you to explain " language id as dir in your view"?
what did you mean by that?
how to do that?
www.shgn.ir
www.shgn.ir/yii-framework/
In a world without any fences or walls,Who needs Gates or Windows!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users