Výsledky 1 až 3 z 3

Téma: [php,MySQL] vicejazykova verze

  1. #1

    Standardní [php,MySQL] vicejazykova verze

    kdybych delal treba redakcni system a potreboval tam vic jazyku tak, aby si mohl clovek vybrat (treba cestinu, anglictinu...), jak by se to dalo nejlip udelat? mate s tim nekdo zkusenosti? napadlo me vsechno narvat do db a pomoci funkce vytahovat vzdycky text daneho jazyka (preda se v session promenne) s danym id. nevite nekdo o lepsim reseni?
    1) ASUS M6A
    2) Toshiba Portége R600-10U
    3) ASUS A8V-X AMD Athlon 64 3000+ Kingmax 2x256MB DDR 400 WD 120GB Samsung 80 GB GMC G30 Fortron FSP400-60THN-P
    Ideální indentace pro Pascal je šest stop pod zem.

  2. #2

    Standardní

    menuje se to tusim gettext ... je tak resenej treba squirrelmail. je to jednoduchej system kterej udela binarni db ve ktery mas
    Kód:
    msgid "Your search failed with the following error(s)"
    msgstr "Vaąe hledání proběhlo neúspěąně díky těmto chybám"
    
    msgid "No persons matching your search was found"
    msgstr "Nebyla nalezena poľadovaná osoba"
    Citace Původně odeslal http://www.gnu.org/software/gettext/
    GNU `gettext' is an important step for the GNU Translation Project, as it is an asset on which we may build many other steps. This package offers to programmers, translators, and even users, a well integrated set of tools and documentation. Specifically, the GNU `gettext' utilities are a set of tools that provides a framework to help other GNU packages produce multi-lingual messages. These tools include a set of conventions about how programs should be written to support message catalogs, a directory and file naming organization for the message catalogs themselves, a runtime library supporting the retrieval of translated messages, and a few stand-alone programs to massage in various ways the sets of translatable strings, or already translated strings. A special GNU Emacs mode also helps interested parties in preparing these sets, or bringing them up to date.
    delal jsem v tom opravy prekladu prave squirrelmailu, ale nic jsem v tom nepsal takze z programatorskyho hlediska nemam tuseni jak moc easy2use to je.

    [edit] ta diakritika v tom hapruje protoze to mam v gVimu blbe otevreny a nechce se mi to resit jinak funguje ok[/edit]
    Hrrrr, will you stop using people as human driven search engines? Google.com has all the answers you need.

  3. #3

    Standardní

    Já bych to řešil (a řeším) tak, že bych si vytvořil nějaký php soubor, který bych na začátku každé stránky naincludoval, ve kterém by byly hlášky uloženy v poli...
    Kód:
    $hlasky["cz"]["mysql_chyba"] = "nepodařilo se připojit k databázi";
    $hlasky["en"]["mysql_chyba"] = "an error occured while connecting to database";
    a pak bych si třeba do session uložil jazyk, který si uživatel zvolil a volal pole z toho includovaného souboru stylem
    Kód:
    echo $hlasky[$_SESSION["jazyk"]]["mysql_chyba"];
    Snad v tom není chyba (už je pozdě a mám za sebou programovací den ...
    -- under construction --

Informace o tématu

Users Browsing this Thread

Toto téma si právě prohlíží 1 uživatelů. (0 registrovaných a 1 anonymních)

Pravidla přispívání

  • Nemůžete zakládat nová témata
  • Nemůžete zasílat odpovědi
  • Nemůžete přikládat přílohy
  • Nemůžete upravovat své příspěvky
  •