Jump to content
Larry Ullman's Book Forums

2 Languages On One App


Recommended Posts

Hi Larry,

 

What would be the best way to achieve this (I have read the chapter in the book) but wasn't sure.

 

I want to eventually offer an app in 2 languages with the classic click a flag and it updates the page to the new language.

 

Most of my data will be static, so the chapter was thorough on ways to that, but I will have some dynamic titles that will need their language equivalent. 

 

Wasn't sure how to work with the dynamic database driven name changes and about the flag button?

 

 

Thanks

 

Jonathon

Link to post
Share on other sites

I know of some websites using this but it is free depending on how many words you are working on. If you website was low traffic to start off with it would be ideal, google does offer a versatile solution. Apart from the English language what is the other language you wish to support? I'll keep my eye open for you.

Link to post
Share on other sites

For the most part it's just navigating around pages and displaying correct models / errors etc. So I thought to use messages.

 

But for instance I generate some categories dynamically on a page in English, I am thinking that I probably should allow for French / Spanish too.So the categories show correctly. 

Link to post
Share on other sites

I found a good currency api if you are interested its free if you update a couple of times a day. But you have to pay if you want updates every second. I will let you know if i find anything. What kind of percentage is your website complete now? You are actually a motivator for me to get mine done i think im about 20%.

Link to post
Share on other sites
  • 3 weeks later...

Thanks for getting back to me on that, mine does unfortunately, i just wanted to know how you got on with it if you did do it. Its quite a tricky situation but i will figure it out shortly. My project will take to end of next year there is just too much stuff to do and its getting more and more complex the more code that is written. Sometimes i forget i already have functions that do stuff that i think i need to code, its spaghetti junction now, hahaha.

Link to post
Share on other sites

I have bitten a little more than i can chew today, run into some major database query frustration, and also found a Yii bug relating to SQL IN and the addInCondition() which was not fixed. But the bug can be fixed by placing addInCondition() after params in the CdbCriteria array. I will get this sorted out tomorrow its time to have a read on joins and stuff, i know the solution to this problem is to use to make the standard SQL solution then convert it into Yii.

 

The problem also is you can't feed CGridView with CActiveRecords directly the CActiveDataProvider is made from CActiveRecord but sometimes you need to make CActiveRecords from the start using queries. I don't want to use CdbCriteria i just want to do my work this time from CActiveRecord, arrrgggghhhh! :angry: if you get what i mean!

 

The good news though is i have multiple active shopping carts working for a single users buying from mulitiple sellers, it took a bit of array work but i got it done in the end.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...