Code Automation

csn-uk

CSN-UK | Charlie
Recently reading an article about language files and involving the recommendation for a method of best providing multilingual support across a site and justifying a method over another it sparked the writing of a tutorial however as part of that a justification was written.

I’m hoping it may open the eyes to a number of developers and hopefully appeal to your businessman/woman side, it ties closely to the topic of automation to streamline your business process and reduce costs, though potential a more practical example.

Consider having multiple sites (one for each language) for the purpose of this example mysite.com has 5 language options and 15 accessible pages. This then means if the webmaster where to change the content on 6 pages, he would need to edit 30 pages (6 pages x 5 languages) which at 1 minuet (find/replace) and the addition of uploading 30 pages possibly 1 or 2 minutes the time to edit the site would be 32 minutes.

Now this sounds like little time, however further consider the rate that a webhosting site or similar news or blog or E-commerce sites change.

Example 1

Possibly once every day? 32 (min) x 365 (days) = 13140 minutes or 219 hours or 9 days

Now consider the cost of your web development team, per member per hour, in the UK a junior web developer would be around £10/hour which is £2190/year per person to spend 32 minutes per day.
With that said now consider the use of an alternative method that is now very common, as before our site has 5 languages and 15 accessible pages however now we are utilizing language_gb.php, language_us.php ... and so on for our 5 languages all holding the changes that we make to the content to the different languages.

To further this we use a PHP function (later discussed) to check the user’s browser, and location we then load the browsers specific style sheet and language file by default based on the information (use of a simple IF Statement and PHP function).

Example 1 - Solution?

Now instead of 30 files we have 5 to edit, which as before 1 minuet per page totalling 5 minutes with the addition of 2 minutes to upload the changes meaning 7 minutes and again as before the same calculation

7 (min) x 365 (days) = 2555 minutes or 106 hours or 4 days
This then means £1060 identically as before is spent for the same change, meaning you are saving just over half, could you afford to lose £1130/year for a single daily site change?

Example 2

Now just to see if this sets in, imagine you where the financial director for apples website on your current webhosting budget, with 44 languages and for the purpose of this example you have 250 pages (sound fair?) and the same upload time 2 minuets

Now we change 2 pages daily (news/announcements)

90x365 = 32850 minutes or 1369 hours or 57 days at £13,690
Vs
46x365 = 16790 minutes or 700 hours or 29 days at £7000

This I hope as explained is a very simple example of a very common and miss looked problem when companies and start-ups select the wrong technologies or get into a bad practice. It is one of the main aims of software engineers (myself for example) to highlight these bad practices when asked to produce new systems for example and even we get tarred by the same brush now and again ;)
 
I recall discussing this.. I am with you in that it really does need more discussion, and in turn perhaps a few more elegant solutions..

At the moment the "multiple language files" method is the best IMO, but even with that there's the potential to spend many(as mentioned) many hours just updating those.

If it could actually be done(don't think so ATM, or even for quite a while), I think the use of automated translation(with caching of course) would be the only way to reduce time spend making updates to multi language sites. This would ultimately only require 1 edit of each page/post, etc..

The current problem with that method is that "perfect direct translation" simply doesn't exist..
 
Just trying to get my head around the idea here and had a few questions;

You're looking at multiple languages contained within a single site. Are you looking to use an online translator or were these hand typed languages?

Would it not be better to have 5 separate sites with the country extensions so that you could get exposure in 5 different search engine markets in native language, and just have a link from each page to the others with the different languages?

It still means more edits, but I'm looking at it from an SEO angle rather than the user angle.
 
Are you looking to use an online translator or were these hand typed languages

This example was comparing that of separate hand typed sites (the cost) vs. a single site using language files or a database

Would it not be better to have 5 separate sites with the country extensions so that you could get exposure in 5 different search engine markets in native language, and just have a link from each page to the others with the different languages?

This can be advantageous however look closely at large sites or complex sites an example being WHMCS or a knowledgebase where by a language dropdown is provided supplied by language files or a database. However the use of multiple domains/sites can be if done incorrectly damaging toward your ranking and the desired effect can be achieved via Google’s webmaster tools, the more prominent reason for the example is the cost that could be placed into marketing for example to boost SEO and Conversion rates.
 
Agreed. I do like the language options in a number of programs. From the content pages of a merchant however, wouldn't we still have to type the 5 different language pages though? If I have content on the site written in English and wanted to change the content (even just a few sentenses) wouldn't the same amount of work to change the data contained in the database take the same amount of time if I was running separate sites?

And yes, as you said, if done incorrectly, multiple sites can cause problems. Personally I prefer the multiple sites and hosted within the various countries for the target market. Dropdown's do make it nice and easy for people. Look at cPanel for that matter. Everything in there is contained in language files too, but if you change it for English, you still have to change it for the other languages.

From a programmer's end of things, and actual software products (stores, billing systems, control panels etc), making a language system is ideal. From a consumer end displaying their site or their products (not just navigation) there's different results.

Am I still following right? Don't want to step on any toes, just making sure I'm getting the right ideas (and learning your programming processes along the way too!) :)
 
Agreed. I do like the language options in a number of programs. From the content pages of a merchant however, wouldn't we still have to type the 5 different language pages though? If I have content on the site written in English and wanted to change the content (even just a few sentenses) wouldn't the same amount of work to change the data contained in the database take the same amount of time if I was running separate sites?

Taking your example or your reasoning it could easily cost the same, the saving comes in the complexity or the number of changes. For example 5 languages (5 sites) and 2 changes on 1 page (done across all 5 sites) would take the same time if hand coded or done within a database (not considering opening/closing, uploading and locating the files)

However if we where to make the same number of changes (2) but across 4 pages of each of the 5 sites then the saving begins for example 4(pages) x 5 (sites) = 20 (editable files) at 1minuet each (hypothetical) we consider that at 20 minutes total.

This is in comparison to language files or a database with an interface including search, find and replace etc... meaning 2 changes across 4(pages) on 5 (sites) = 5 editable files at a minuet each again hypothetical and we can then draw the conclusion of 5 minutes.

This sounds to be nit picking however it adds up very quickly over time, another way is to consider this without technology, imagine you own a firm that hires 5 builders, working standard 9 -5 hours, how many of those hours are they physically working?

And all of us knowing a builder factor about 4/5 10 minuet “tea breaks” a day, 1hour lunch, an hour or so to cleanup and factor an hour a day transit. (5x10 = 50 + (60 x 3) = 230/60 = 3 hours and 50 minutes per builder per day.

So for maths sake, 4 hours a day paid of which your builders are not working so 365 (hypothetically) x (4x5 [builders]) = 7300 hours at around £60/hour £438,000/year.

It’s a very interesting concept that was put forward to me a long while back and reiterated by my accountant with the above example after discussing issues with a company my father manages.

Consider now that we use activity timers and timeouts for inactive in the computing industry and builders and similar use van trackers and onsite spot checks.


Am I still following right? Don't want to step on any toes, just making sure I'm getting the right ideas (and learning your programming processes along the way too!) :)

I’d give you an A+ :D for noticing that minimal change would not warrant an advantage with this method but consider 75% of the cost spent building/developing a system or website is actually spent on maintaining it after completion... and the cost then is greatly increased to make further change.

It’s one of the many reasons that with a board of directors or management team that there is a technologist with the ability to voice an opinion to rectify a lot of the issues that can arise unknowingly due to misunderstanding the abilities or over estimating them in terms of a chosen language or technology.
 
Ok great - sounds like we're on the same page! ;)

Funny you should mention the builders and the tea breaks. I just had a conversation with someone the other day about how when I worked at a hotel many years ago I often found myself being the only person on duty as everyone was taking smoke breaks that last from 10-15 minutes every hour. It was for that reason that I picked up cigarettes and would take my own 15 minute breaks! Of course it didn't take too long and we were able to implement a company policy that if you left the front desk (for any reason other than to help a customer) you had to clock out. The excessive bathroom breaks, smoke breaks and "just needed to clear my head" breaks dropped dramatically. I can only imagine the money saved after we implemented that policy.
 
There are potential advantages to the "multiple site" method with appropriate country extensions, but I want to make it clear that there would be no need to have entirely separate sites. Point all 5 domains to the same place, an htaccess rewrite, and you achieve the same result as 5 separate sites but with a great deal of efficiency :)
 
Achieve "similar" results :) Speed is a key factor in websites and online stores. If you can decrease the speed by having the websites in the various countries, you are catering to your audience.

But as a whole, yes, a rewrite would do wonders for many sites.
 
Back
Top