Solved

php YAML

Posted on 2013-11-07
8
720 Views
Last Modified: 2013-11-07
A customer has this requirement:

"All strings used in the User Interface for the Portal will be handled through a YAML file for each language. This makes it easy to swap the text with the text from another language. The disadvantages of this is that translated text might break layouts and structure because of differences of string length."

How can this be done in php?

I'm guessing that what is described here would be used? http://us2.php.net/yaml

Thanks
0
Comment
Question by:Richard Korts
  • 3
  • 3
  • 2
8 Comments
 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 250 total points
ID: 39632295
Does the customer have the YAML C library installed on the server?  
http://us2.php.net/manual/en/yaml.requirements.php

Does the customer have access to install PECL extensions on the server?
http://us2.php.net/manual/en/yaml.installation.php
0
 
LVL 58

Accepted Solution

by:
Gary earned 250 total points
ID: 39632311
Not sure what the question is. How to use YAML or to stop it breaking your layout because of the varying lengths of the translated text.
If how to use it then their are a few ready made classes.
If its to get around the varying text lengths - well that is upto a good page design that can take them into account.
Edit.
After rereading it - are you asking how to handle the various translated versions
0
 

Author Comment

by:Richard Korts
ID: 39632340
To GaryC - It's about how to use YAML; I think I see that from the doc I found in php.net.

To Dave Bardwin - I don't know, to my knowledge, there is no web server (or it is yet unknown); I'm guessing a commercial service like GoDaddy, etc.
0
 
LVL 58

Expert Comment

by:Gary
ID: 39632345
Noooo not GoDaddy - seriously do not host your site their.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:Richard Korts
ID: 39632353
To GaryC123.

Regarding GoDaddy.

Why not? In my opinion they currently offer the BEST web hosting prices & customer support I am aware of. You get a live body that speaks English in the USA in minutes; usually less than one minute.

I can get just as good support (but at higher prices) elsewhere, like, for example, ChiHost.

I also use 1 & 1; their customer support is awful; took me a week to get (what turned out to be) a trivial problem fixed.

Who would you recommend?
0
 
LVL 58

Expert Comment

by:Gary
ID: 39632389
Well I had written a nice reply and then my browser crashed...

You will find all the experts here will whole heartedly advise against using GoDaddy for hosting. For domains they are great and I use them for that.  (I wouldn't recommend 1&1 either)

But they have a prohibitively anal attitude to what you can and cannot do on your site.
Things like their own sanitized version of PHP.  
You have to use their email relay server to send an email because all their IP's are blacklisted.
Something goes wrong with you site and your memory usage goes up - your site is suspended!
You have too many visitors - you are suspended!
You have had good customer support - you are lucky.  Wait til you have a real technical question.

You may think they are cheap but they give you the bare minimums for everything - you want a few more email addresses well it's gonna cost you.

I could rant on and on but you can easily get comparable and probably better hosting elsewhere for the same price
Ask a question about who to use for your hosting and I'm sure you will get some good recommendations, I am not US based so I wouldn't know who the better ones are.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39632402
I have a number of sites that I'm responsible for on Godaddy.  And while I'm not having any problems with them, you will never be able to install PHP/PECL YAML on shared hosting.  Not just there but anywhere.  Installing PECL extensions requires 'root' access to the server and that just isn't going to happen.

So yes, the hosting and server is important when you want things like YAML that are not standard PHP extensions.
0
 

Author Comment

by:Richard Korts
ID: 39632453
Thank you both for those insightful comments.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now