$Header: /cvsroot/yappa-ng/yappa-ng/docs/LANGUAGE_SUPPORT,v 1.6 2004/01/07 17:53:35 zirkon13 Exp $ yappa-ng Language Support Manual: ================================================================================ = OVERVIEW = ================================================================================ LANGUAGE-SUPPORT Setting your default language (MUST!) If you want language-support If you do NOT want language-support Language autodetection Intuitive Language Selection If you do not want all these languages for your yappa-ng If you want to translate a NEW (=not yet translated) language -------------------------------------------------------------------------------- - LANGUAGE-SUPPORT - -------------------------------------------------------------------------------- First: if you want to use the English language as default language and that's all you want you can stop reading - there will be no trouble! Just select if you want language-support or not (yes/no) in your config.inc.php - that's it! ;-) -------------------------------------------------------------------------------- The principle of language support is that you have all texts, which are displayed in yappa-ng, in a separate file for each language - the language-definition-files (=languagefiles). If you change language yappa-ng just loads the new file and uses all the names (text AND filenames) that are defined in there. You need at least one languagefile, because if you don't have at least one there will be NO text in yappa-ng! yappa-ng will try to detect automatically which language the user accepts and if this language is installed it will present the user automatically with this language. To make sure yappa-ng knows which languagefile it should use on first connect with a user (if you have the "language-autodetect" off or you do not have the language installed which your user wants) you have to define a "default" language. And if you decide to disable language-support yappa-ng still needs at least one languagefile. Disabling language-support only means, that you will get no longer the option to change the language in the right upper corner. (The language-change-menu will not appear!). ................................................................................ . Setting your default language (MUST!) . ................................................................................ You NEED a default language correctly set, even (!!) if you disable the language support!!! _________________________________________________ The default language is the language - yappa-ng starts with (every time) - yappa-ng uses, if you disable language-support _________________________________________________ - If you do not change this parameter the default language is "English". - To set your own default language edit the "config.inc.php" - file, parameter "lang_default". This name has to be exactly as it is in the list of translated languages! You see the names in the language-selection menu (if enabled). - At the moment there are 16 languages implemented. You can only set one of these as default. To set one as default set the parameter to one of the following names: - Deutsch - English - Español - Chinese - Dansk - Finnish - Français - Italiano - Magyar - Nederlands - Norsk - Polski - Português-Brasileiro - Romana - Russian - Svenska ................................................................................ . If you want language-support . ................................................................................ - Enable language support in your config.inc.php "language_support" => "yes" ................................................................................ . If you do NOT want language-support . ................................................................................ - If this should be your only language and you don't want any language support for Englisch, German,... Then you can disable language-support and only use this one language. Set the "language_support" in config.inc.php to "no" "language_support" => "no" ................................................................................ . Language autodetection . ................................................................................ - As yappa-ng gets translated into more and ever more languages the chances have increased that the user-preferred language is available. yappa-ng tries to read the information provided from the client-browser of the user about the preferred/accepted language. If the desired language is available yappa-ng switches automatically to this language. You can switch this feature on/off in the config.inc.php "language_autodetect" => "yes" (or "no"). Some things to remember: ------------------------ - You have still to define a default language! (If a user from Africa with the language Swahili connects to your photo-album the chances are high that you will not have this language installed! ;-) - If you have language-support switched off be sure to switch off the autodetect too. The user has no chance to switch to his preferred language if the client browser switches to the "wrong" language. (I have been in Cuba on holiday, and when I checked my server at home yappa-ng switched to Spain. That was correct, because the Cuban-installed browser said it wants Spanish. But: I don't speak one single word Spanish! ;-) ................................................................................ . Intuitive Language Selection . ................................................................................ - With the "autodetect_language" feature enabled the possibility is high that a user from another country with another language than your default homepage language does not see your album title, album description and image captions. To avoid this dilemma there is the feature "intuitive language selection". Here is how it works: Suppose: You have autodetect enabled and your default language is "English" Suppose: Your native language is English (that's why you have default language to "English") :-) Suppose: You have all your album-descriptions and all image captions in English Suppose: Someone connects with autodetected language "Espanol" This guy has yappa-ng in Spanish, but will NEVER see your hard work in commenting all images and making a decent album-title and a nice album-description. With "lang_intuitive" set to "yes" this Spanish guy keeps yappa-ng in Spanish - but gets your English (or other Default-language) album descriptions, image captions,... If you have a Spanish album title created he gets OF COURSE his (= Spanish ) version! A really nice feature! This feature does NOT affect your yappa-ng language selection (be it autodetected, selected or default). The language of the program (yappa-ng) itself (explaining texts, buttons,...) is untouched. This feature works only with the language related user created/edited files: - album title and album description - image captions - gallery main news file These are the files where every language has its own (separate) file. It works only for the DEFAULT-language. You can switch this feature on/off in the config.inc.php "lang_intuitive" => "yes" (or "no"). ................................................................................ . If you do not want all these languages for your yappa-ng . ................................................................................ - Delete all languagefiles for languages you do not want to support (lang_???.inc.php - files in the languages directory). yappa-ng gives you automatically the option to select a language for each languagefile in his directory it finds. So renaming or deleting an unwanted languagefile removes automatically this language from the language-selection dropdown menu! On the other hand: Why should you? ;-) ................................................................................ . If you want to translate a NEW (=not yet translated) language . ................................................................................ - Copy an existing languagefile to a new name. A languagefile should begin with "lang_" and then 3 characters for the language, followed by ".inc.php" !!! (e.g. lang_ger.inc.php, lang_eng.inc.php, lang_ita.inc.php, ...) $ cp lang_eng.inc.php lang_ita.inc.php - Edit the new language file. (Detailed instructions are in the languagefile itself). - Translate all the stuff on the *right* side (!) (not the left!) in the new languagefile - Edit the file "languages_translated.inc.php" in the languages-directory and add the new language. (Instructions find in the file itself). - Do NOT use a text editor like WinWord, or, if you do - be sure to save as "text only" or similar mode. The files must be in plain ASCII format (text only). - Be sure the new languagefile is in your yappa-ng languages directory and is readable for your web browser. - send the new languagefile to me (wizard@zirkon.at) ;-)) ------------------------------------------------------------------------------------------------------- yappa-ng Homepage: http://www.zirkon.at/zirkon/scripts/yappa-ng/yappa-ng_main_eng.html yappa-ng Demo-Site: http://www.zirkon.at/yappa-ng_demo/ yappa-ng on sourceforge.net: http://sourceforge.net/projects/yappa-ng/ yappa-ng on freshmeat.net: http://freshmeat.net/projects/yappa-ng/