View previous topic :: View next topic |
Author |
Message |
toma Smarty Regular
Joined: 25 Apr 2003 Posts: 62
|
Posted: Tue May 20, 2003 8:44 pm Post subject: |
|
|
AZTEK wrote: | The whole astalavista issue is a good example. If I didn't live in the US I wouldn't have any problem using the bablefish translations, but I do, and therefore am bound to US laws on copyright and if they say "Hey this is ours we made it don't copy what it generates" then I have to respect that. |
How would you go about creating a translation file for a language you (or anyone you have access to) don't speak without 'violating' copyright? |
|
Back to top |
|
AZTEK Smarty Pro
Joined: 16 Apr 2003 Posts: 235 Location: Purdue University
|
Posted: Tue May 20, 2003 8:54 pm Post subject: |
|
|
You don't I have a few ties to people who speak more then english and I ask them to translate phrases for me using my XML files and then they put their name at the top as translator. The file format closely follows gettext's .po only its in XML. _________________ "Imagine a school with children that can read and write, but with teachers who cannot, and you have a metaphor of the Information Age in which we live." -Peter Cochrane |
|
Back to top |
|
andreas Smarty Pro
Joined: 22 Apr 2003 Posts: 106
|
|
Back to top |
|
AZTEK Smarty Pro
Joined: 16 Apr 2003 Posts: 235 Location: Purdue University
|
Posted: Tue May 20, 2003 9:04 pm Post subject: |
|
|
Well a professional translator is always best because all languages have a funky change somehow. Thats why I ask friends. I trust they do a good translation but in all truth I don't know. _________________ "Imagine a school with children that can read and write, but with teachers who cannot, and you have a metaphor of the Information Age in which we live." -Peter Cochrane
Last edited by AZTEK on Tue May 20, 2003 9:42 pm; edited 1 time in total |
|
Back to top |
|
Wom.bat Smarty Pro
Joined: 24 Apr 2003 Posts: 107 Location: Munich, Germany
|
Posted: Tue May 20, 2003 9:12 pm Post subject: |
|
|
err... I might be wrong, but I guess it's illegal in most countries on this planet if I just provide translations done by babelfish and "sell" them as my own service or whatever... |
|
Back to top |
|
toma Smarty Regular
Joined: 25 Apr 2003 Posts: 62
|
|
Back to top |
|
andreas Smarty Pro
Joined: 22 Apr 2003 Posts: 106
|
|
Back to top |
|
Escariion Smarty Rookie
Joined: 14 May 2003 Posts: 7 Location: Berlin, Germany
|
Posted: Thu May 22, 2003 11:23 am Post subject: |
|
|
@AZTEK:
what if you want to translate something like this:
There {if $sessions.num ne "1"}are {$sessions.num} visitors{else}is {$sessions.num} visitor{/if} online!
this is the way i do it in my project:
XML-Language-File: lang_english.xml
(i use this config/path/var-format in all my xml-config-files, so i did not change it for language-files)
Code: | <config>
<path name="lang">
<var name="who_is_online">Who is online?</var>
<var name="sessions_total">There {if $sessions.num ne "1"}are {$sessions.num} visitors{else}is {$sessions.num} visitor{/if} online!</var>
</path>
</config> |
- xml-language-file is loaded once at the beginning of the script
- lang is assigned: $smarty->assign("lang",$lang);
- there is one global language-file loaded for the framework and each module loads his own language-file
Smarty:
Code: | {eval var=$lang.sessions_total} |
or if no variables have to be replaced
Code: | {$lang.sessions_total} |
PHP:
Code: | getText('sessions_total') |
- works, because anything that is printed to the browser is going trough the smarty-engine first |
|
Back to top |
|
toma Smarty Regular
Joined: 25 Apr 2003 Posts: 62
|
Posted: Thu May 22, 2003 11:02 pm Post subject: |
|
|
andreas wrote: | Everybody knows babelfish - translations are not very nice, but I would like to know how good/bad the different translation-engines work, so here 2 results:
Quote: | Through integration of a procurement portal and presentation of the procurement program into the existing Internet appearance, you develop an additional benefit potential of your available Internet presence |
Quote: | by integration of a procurement portal and presentation of the procurement program into the existing InterNet appearance you are opened an additional use potential of your existing InterNet operational readiness level |
first is from http://www.heisoft.de/, second from babelfish(google-translation is 1:1 the same like babelfish) . Which one is the better translation, how would you change this sentence? |
Well the first definatly looks better, but I think this thread was more concerned with the implementation of multilanguage support rather than translation engines. |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Thu May 22, 2003 11:09 pm Post subject: |
|
|
Quote: | I think this thread was more concerned with the implementation of multilanguage support rather than translation engines. |
I'm starting to think that translations is proving to be a topic that encompasses enough material to warrant a forum in its own right. All of the related topics could be collected there and long threads like this one can be split up.
Ideas? |
|
Back to top |
|
AZTEK Smarty Pro
Joined: 16 Apr 2003 Posts: 235 Location: Purdue University
|
Posted: Fri May 23, 2003 3:10 am Post subject: |
|
|
Escariion wrote: | @AZTEK:
what if you want to translate something like this:
There {if $sessions.num ne "1"}are {$sessions.num} visitors{else}is {$sessions.num} visitor{/if} online!
this is the way i do it in my project:
XML-Language-File: lang_english.xml
(i use this config/path/var-format in all my xml-config-files, so i did not change it for language-files)
|
You would have to have two seperate entries. Then use an if to decide which one to use.
Code: | {if $sessions.num != "1"}
{trans d=$sessions.num}are %d visitors{/trans}
{else}
{trans d=$sessions.num}is %d visitors{/trans}
{/if} |
For your tpl and
Code: | <?xml version="1.0" encoding="utf-8" ?>
<locale lang="de">
<header>
<project>Project Name</project>
<create>2003-01-12 17:24-0500</create>
<revise>2003-01-15 19:15-0500</revise>
<trans>Your Name - Your Email</trans>
<lang>Deutsch</lang>
</header>
<message>
<id>are %d visitors</id>
<string>%d Besucher sind</string>
</message>
<message>
<id>is %d visitor</id>
<string>%d Besucher ist</string>
</message>
</locale> |
for your de.xml file (its been way to long since german class for me to even think those translations are remotely correct). I am sure the a system would be easy to adapt to your style of structure though. _________________ "Imagine a school with children that can read and write, but with teachers who cannot, and you have a metaphor of the Information Age in which we live." -Peter Cochrane |
|
Back to top |
|
toma Smarty Regular
Joined: 25 Apr 2003 Posts: 62
|
Posted: Fri May 23, 2003 3:58 pm Post subject: |
|
|
boots wrote: | I'm starting to think that translations is proving to be a topic that encompasses enough material to warrant a forum in its own right. All of the related topics could be collected there and long threads like this one can be split up.
Ideas? |
Nah; bad idea. Over time it'll just turn into an unused forum. I think keeping this thread here is fine. |
|
Back to top |
|
thuree Smarty n00b
Joined: 29 May 2003 Posts: 3
|
Posted: Thu May 29, 2003 6:04 am Post subject: Localization - Best strategy - Advice wanted? |
|
|
Hej,
I am about to re-design a website (www.huaruichemicals.com) and this time I want to make sure I am using the correct strategy and tools.
This web site will mainly consist of static pages, but the news section will be dynamic (preferably updatable from the web).
I will need to have the website available in English, Chinese, and Swedish.
To start with anyway.
I have been considering using Smarty to separate the code from the design. But I want my pages to be in strict XHTML.
Another solution is to use XML/XSL (which I will have learn from scratch).
I want to use CSS (or similar) to keep the formatting away from the HTML code.
I am considering a database (MySQL), or XML, or gettext for the various language strings.
Would very much like to receive some hints and tips from the "experts" in this forum.
Thanks in advance
/Bengt |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Thu May 29, 2003 6:20 am Post subject: |
|
|
Quote: | Would very much like to receive some hints and tips from the "experts" in this forum. |
hmmm. Quotations around 'experts' ? Someone please remind me: is that good or bad?
|
|
Back to top |
|
thuree Smarty n00b
Joined: 29 May 2003 Posts: 3
|
Posted: Thu May 29, 2003 6:29 am Post subject: |
|
|
Sorry for confusing...
Anyway, since all in this forum is most likely more experienced than I am then all are in my opinion experts.... then again, some I am sure of it, are more experts than others...
I only know for a fact, that I do not belong in the "expert" classification ... yet
/Bengt |
|
Back to top |
|
|