Results 1 to 26 of 26

Thread: Language options

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Free-DC Semi-retire gopher_yarrowzoo's Avatar
    Join Date
    Mar 2002
    Location
    Knoxville, TN
    Posts
    3,985
    I really should look at this, i did look at the code last night and try to figure our what was going where but because it's been a while since I really coded my brain went "wibble" and kinda gave up... maybe need to clear up the folders so all the "test" stuff is in a test folder or something...
    Semi-retired from Free-DC...
    I have some time to help.....
    I need a new laptop,but who needs a laptop when you have a phone...
    Now to remember my old computer specs..


  2. #2
    Administrator Bok's Avatar
    Join Date
    Oct 2003
    Location
    Wake Forest, North Carolina, United States
    Posts
    24,596
    Blog Entries
    13
    Running live now with german, french and italian. It's only on the project milestones though. I haven't done the combined or bagdes ones yet.

    Looks ok though, last run had a couple of italian and one french which looked good..

    Bok

  3. #3
    Administrator Bok's Avatar
    Join Date
    Oct 2003
    Location
    Wake Forest, North Carolina, United States
    Posts
    24,596
    Blog Entries
    13
    hmmmm, hope this isn't gibberish as it did post...

    Code:
    PROCESSING: <fb_id> - ca0f67f204015c0bb41b4f2eb3796ad4 9.999 in Yoyo@Home -  neu gewonnenen ein Abzeichen in bronze Yoyo@Home!Successfully posted!...
    and it is a valid badge gained today - shown here

    Bok

  4. #4
    Administrator AMDave's Avatar
    Join Date
    Sep 2004
    Location
    deep in a while-loop
    Posts
    1,948
    Well done Bok!

    If it is gibberish it will be my problem and I will fix the translations.

    When you run out of what is there so far, prod me and I'll get some more done.

    Great job
    . . . . . ___
    . . . . . . .\___/\______
    . . . . . . . \__AMD___\\__
    -----------------------------------------

  5. #5
    Administrator Bok's Avatar
    Join Date
    Oct 2003
    Location
    Wake Forest, North Carolina, United States
    Posts
    24,596
    Blog Entries
    13
    only done 3 languages so far, will get spanish and dutch next I think and then be more adventurous and go for Czech..

  6. #6
    Administrator Bok's Avatar
    Join Date
    Oct 2003
    Location
    Wake Forest, North Carolina, United States
    Posts
    24,596
    Blog Entries
    13
    added spanish. The phrases are a little different Dave, so I put a few of them through Google translate for spanish and they came out slightly different, let me know what you think. If you want to do some others (or anyone for that matter) - this is the format I need them in..

    This is es_ES.php, note the number format I need too, last two parameters are what needs to change and they are decimal point and thousand seperator..

    Code:
    $cat_project = 'Proyecto';
    $cat_subproject = 'Subproyecto';
    $cat_milestone = 'Hito';
    $cat_projectapp = 'Solicitud del proyecto';
    $cat_team = 'Equipo';
    $cat_title = 'Hitos BOINC';
    $milestone = number_format($mstone[$i],0,',','.');
    $message = " acaba de pasar $milestone en $descr[$i]!";
    $message2 = " acaba de pasar en $milestone BOINC combinado!";
    $message3 = " gan" . chr(23) . " una insignia de $badge_type[$i] en $descr[$i]!";
    I'm NOT (yet) transcribing the names of the badges as I pull them from my database and haven't figured out a convenient way to do it yet (could go down the 'switch' way but am avoiding that for now..thinking of the future mainly...)

    a en_US.php would look like

    Code:
    $cat_project = 'Project';
    $cat_milestone = 'Milestone';
    $cat_projectapp = 'Project App';
    $cat_team = 'Team';
    $cat_title = 'BOINC Milestones';
    $message =  " just passed $milestone in $descr[$i]!";
    $message2 = " just passed $milestone in Combined BOINC!";
    $message3 = " just gained a " . $badge_type[$i] . " badge in $descr[$i]!";

    Bok

  7. #7
    Free-DC Semi-retire gopher_yarrowzoo's Avatar
    Join Date
    Mar 2002
    Location
    Knoxville, TN
    Posts
    3,985
    I know this may seem silly but would it not be quicker to have a lang translate table in the DB?
    id,lang,cat_project,cat_subproject,cat_milestone,cat_projectapp,cat_team,cat_title,milestone_numform ,message,message2,message3
    '1','en_US','Project','Milestone','Project App','Team','BOINC Milestones',',',' just passed #milestone in #descr[#i]!',' just passed $milestone in Combined BOINC!',' just gained a #badge_type[#i] badge in #descr[#i]!'
    '2','fr_FR','....french here..............'
    '3','de_DE','....german here............'
    '4','it_IT','.....italian here...........'
    '5','es_ES','Proyecto','Subproyecto','Hito','Solicitud del proyecto','Equipo','Hitos BOINC','.','acaba de pasar #milestone en #descr[#i]!',' acaba de pasar en #milestone BOINC combinado!',' gan' . chr(23) . ' una insignia de #badge_type[#i] en #descr[#i]!'

    SELECT cat_project,cat_subproject,cat_milestone,cat_projectapp,cat_team,cat_title,milestone_numform,message ,message2,message3 WHERE lang==$lang FROM lang_table
    assign $cat_project, $cat_subproject, $cat_milestone, $cat_projectapp, $cat_team ,$cat_title, $milestone1, $message, $message2, $message3

    $milestone = number_format($mstone[$i],0,',',$milestone1);
    $message=str_replace("#","$",$message);
    $message2=str_replace("#","$",$message2);
    $message3=str_replace("#","$",$message3);

    Quicker?
    Badges could do the same depends on how many badges we got and how many languagues
    badge,image,en_US,fr_FR,de_DE,it_IT,es_ES.....etc..
    Semi-retired from Free-DC...
    I have some time to help.....
    I need a new laptop,but who needs a laptop when you have a phone...
    Now to remember my old computer specs..


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •