Welcome Guest, Not a member yet? Register   Sign In
View code that hurts your brain
#8

[eluser]xwero[/eluser]
Randy creating language dependent views that contains a certain amount of text are easier to maintain and modify than placing language dependent strings everywhere in the views. I'm not talking about views that only contain single words like most forms but views that have phrases in them who contain variables.
Quote:10 emmertjes water halen
Translates into
Quote:Getting 10 buckets of water
10 is the variable here. This is what i meant saying a continuous string in one language isn't always a continuous string in another language. Sure you can use sprinf but for language editors it's easier to understand if you show them
Code:
<?php echo $number ?> emmertjes water halen
Than
Code:
%s emmertjes water halen
You may not understand the phrase but you know the variable will be a number.

From experience i learned people who want multilanguage sites are quicker to translate words/phrases in context than out of context even if they have to write the same things more than once because of it.

Working with language files can also get out of hand on sites that require a lot of words and phrases. Sometimes there can be a slight difference of meaning in the word between languages in a certain context making it necessary to create a new word entry for that language but then you have to check the context if you only have language dependent words. If you use a language dependent view there is less hassle in these situations.

Bottom line translations are a very tricky business to program.


Messages In This Thread
View code that hurts your brain - by El Forum - 08-22-2008, 03:32 AM
View code that hurts your brain - by El Forum - 08-22-2008, 08:22 AM
View code that hurts your brain - by El Forum - 08-22-2008, 09:42 AM
View code that hurts your brain - by El Forum - 08-22-2008, 10:45 AM
View code that hurts your brain - by El Forum - 08-22-2008, 12:37 PM
View code that hurts your brain - by El Forum - 08-22-2008, 02:28 PM
View code that hurts your brain - by El Forum - 08-22-2008, 04:10 PM
View code that hurts your brain - by El Forum - 08-22-2008, 04:42 PM
View code that hurts your brain - by El Forum - 08-22-2008, 06:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB