Solved

php YAML

Posted on 2013-11-07
8
718 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 82

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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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 82

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
This article discusses four methods for overlaying images in a container on a web page
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

708 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

17 Experts available now in Live!

Get 1:1 Help Now