Aramika
Dieses neue Thema wurde aus abgetrennten Beiträgen, ursprünglich in Neu! Sprach-BBCs und Sichtbarkeit - New! Language BBCs and visibility (http://forum.sangham.net/index.php?topic=1831.0), hier zu einem neuen eröffnen. Für ev. ergänzende Informationen zur Herkunft, sehen Sie bitte das Ursprugsthema ein. Anumodana!Wonderfull, wonderful, Douglas!
My person, putted a lot of effort into making a forum multilingual. Its general not so interesting under smf users and developers.
For the "own" place it was managed with lang-bbcs (put the under span tag) and make them view-able via membership. So people can see more languages. Maybe an inspiration.
My person guesses that in this case it runs under div-tag, right? Would it be possible to have such as a general selecting menu for the board, where on could select his prefered languages to view? It might be a lot of work to select for each post. How ever, it might be good if a post contains a visible info of avaliable languages and in the case one has not enabled a certain language, he/she could make it visible by click.
Or, even better, "just" making a dropdown under der board language drop down box for content language and let more languages be selectable. So it would remember on cookies either hidden or visible, I guess. Not much to do within the data base.
Would it be, is it welcome, or is an assuming to take and make use of you invention here? Especially to test.
Generally there are two things when using more languages. One is the selection of prefered languages (default is either good it setting all as default, to do not miss certain guests seeks) or by browsers setted language, if such is possible (btw: would be generally good if such is possible for the default board language, in regard of software side texts).
The other thing is the layout and distinction of the various languages. On one hand, to make the read more confortable when enable more content languages and on the other, because different languages may have different scripts (size, line space...)
Maybe take a look at this topic (even not that technical special): Neu! Sprach-BBCs und Sichtbarkeit - New! Language BBCs and visibility (http://forum.sangham.net/index.php/topic,1831.0.html)
Maybe also good, in the case the user does not use the bbcs, to automatical but his text under his board language.
To get in not to much confusing and most flexible, its good to hardly distinct between content language and board language.
Antes gave a good working solution for boradulanguage-strings. (http://forum.sangham.net/index.php/topic,1145.msg8259.html#msg8259), as for category, my person did not tried it for now.
Would be great to know this going to become the root of a full "multilanguage" mod.
There have been some general discussion on smf-form, if more interested, let it be know, so that my person cold search them and list.
Again here: please should be seen just as an inspiration and should not bend you from maybe more importand works for you and especially that which is neede for maintaining your livelihood.
Read a little about the further developments and seems to be real great. One, sure not so easy to solve thing: the post-subject.
While writting a topics name in two languages is mostly possible, starting with three is very limited.
(No need to make the post of mine visible, thought it might be useful imput. My Douglas be not to much confused by the question, just importand to be sure before: Is it welcome to try and use this mod for the buddhist community of monks on sangham.net?)
Sorry about replying so late to your messages. Have you looked at version 2.1? I made changes to it regarding "default languages" and such that would probably interest you.... I can add some of your other suggestions, as well....
You are welcome to use any mod that I have on any forum you have. I don't mind. In fact, that's why I made them: to be used!
Absolutly no problem, Douglas.
Yes, my person had seen the changes in you discription and Sadhu! (confirming a skilful deed by "Excelent!") for you generosity and invitation.
What ever Douglas feels inspired, and/or useful. My person, if coming across something would always give "naive" feedback.
It for my person needed to say, that he could not give back anything, living on alms and not accepting and using money.
My person will try to install it, not sure if should risk, since on smf 2.0.10, "only" a small tablet and very slow internet connection, as well as no real possibility to ask for support in cases of problems, at this times.
Let's see, in successful case and if possible, my person will give feedback.
Appreciation again for you skilful, generous deeds, Douglas.
Installed
"Show specified language Modification" seems to fine installed. bbc-icon are still missing. Lets test a little.
Guest should see the post in your set language and right on the bottom one may change to other avaliableInstalliert
"Gewähle Sprache zeigen Modifikation" scheint fein installiert zu sein. BBC-Knöpfe fehlen noch. Mal alles etwas testen.
Guest sollte den Beitrag in der eingestellten Sprache sehen und in der rechten unteren Ecke mag man nun andere verfügebare Sprache wählen.
Aramika
[ :-| No english translation for this post made for now, please try to select another language, below in the select bar. Let it be known if interested without hesitating. If inspired, feel also free to share one by yourself. :) ]
// Our massive "RFC-1766 => Language string" array:
$codes = array(
'en' => 'English',
'en-au' => 'English (Australia)',
'en-bz' => 'English (Belize)',
'en-ca' => 'English (Canada)',
'en-gb' => 'English (United Kingdom)',
'en-ie' => 'English (Ireland)',
'en-jm' => 'English (Jamaica)',
'en-nz' => 'English (New Zealand)',
'en-ph' => 'English (Philippines)',
'en-tt' => 'English (Trinidad)',
'en-us' => 'English (United States)',
'en-za' => 'English (South Africa)',
'en-zw' => 'English (Zimbabwe)',
'af' => 'Afrikaans',
'ar' => 'Arabic',
'ar-ae' => 'Arabic (U.A.E.)',
'ar-bh' => 'Arabic (Kingdom of Bahrain)',
'ar-dz' => 'Arabic (Algeria)',
'ar-eg' => 'Arabic (Egypt)',
'ar-iq' => 'Arabic (Iraq)',
'ar-jo' => 'Arabic (Jordan)',
'ar-kw' => 'Arabic (Kuwait)',
'ar-lb' => 'Arabic (Lebanon)',
'ar-ly' => 'Arabic (Libya)',
'ar-ma' => 'Arabic (Morocco)',
'ar-om' => 'Arabic (Oman)',
'ar-qa' => 'Arabic (Qatar)',
'ar-sa' => 'Arabic (Saudi Arabia)',
'ar-sy' => 'Arabic (Syria)',
'ar-tn' => 'Arabic (Tunisia)',
'ar-ye' => 'Arabic (Yemen)',
'as' => 'Assamese',
'az' => 'Azerbaijani',
'be' => 'Belarusian',
'bg' => 'Bulgarian',
'bn' => 'Bangla',
'ca' => 'Catalan',
'cs' => 'Czech',
'da' => 'Danish',
'de' => 'German (Germany)',
'de-at' => 'German (Austria)',
'de-ch' => 'German (Switzerland)',
'de-li' => 'German (Liechtenstein)',
'de-lu' => 'German (Luxembourg)',
'div' => 'Divehi',
'el' => 'Greek',
'es' => 'Spanish',
'es-ar' => 'Spanish (Argentina)',
'es-bo' => 'Spanish (Bolivia)',
'es-cl' => 'Spanish (Chile)',
'es-co' => 'Spanish (Colombia)',
'es-cr' => 'Spanish (Costa Rica)',
'es-do' => 'Spanish (Dominican Republic)',
'es-ec' => 'Spanish (Ecuador)',
'es-gt' => 'Spanish (Guatemala)',
'es-hn' => 'Spanish (Honduras)',
'es-mx' => 'Spanish (Mexico)',
'es-ni' => 'Spanish (Nicaragua)',
'es-pa' => 'Spanish (Panama)',
'es-pe' => 'Spanish (Peru)',
'es-pr' => 'Spanish (Puerto Rico)',
'es-py' => 'Spanish (Paraguay)',
'es-sv' => 'Spanish (El Salvador)',
'es-us' => 'Spanish (United States)',
'es-uy' => 'Spanish (Uruguay)',
'es-ve' => 'Spanish (Venezuela)',
'et' => 'Estonian',
'eu' => 'Basque (Basque)',
'fa' => 'Persian',
'fi' => 'Finnish',
'fo' => 'Faeroese',
'fr' => 'French (France)',
'fr-be' => 'French (Belgium)',
'fr-ca' => 'French (Canada)',
'fr-ch' => 'French (Switzerland)',
'fr-lu' => 'French (Luxembourg)',
'fr-mc' => 'French (Monaco)',
'gd' => 'Scottish Gaelic',
'gl' => 'Galician',
'gu' => 'Gujarati',
'he' => 'Hebrew',
'hi' => 'Hindi',
'hr' => 'Croatian',
'hu' => 'Hungarian',
'hy' => 'Armenian',
'id' => 'Indonesian',
'is' => 'Icelandic',
'it' => 'Italian (Italy)',
'it-ch' => 'Italian (Switzerland)',
'ja' => 'Japanese',
'ka' => 'Georgian',
'kk' => 'Kazakh',
'kn' => 'Kannada',
'km' => 'Khmer',
'ko' => 'Korean',
'kok' => 'Konkani',
'kz' => 'Kyrgyz',
'lt' => 'Lithuanian',
'lv' => 'Latvian',
'mk' => 'Macedonian (FYROM)',
'ml' => 'Malayalam',
'mn' => 'Mongolian (Cyrillic)',
'mr' => 'Marathi',
'ms' => 'Malay',
'mt' => 'Maltese',
'my' => 'Burmese',
'nb-no' => 'Norwegian (Bokmal)',
'ne' => 'Nepali (India)',
'nl-be' => 'Dutch (Belgium)',
'nl' => 'Dutch (Netherlands)',
'nn-no' => 'Norwegian (Nynorsk)',
'no' => 'Norwegian (Bokmal)',
'or' => 'Odia',
'pa' => 'Punjabi',
'pi' => 'Pali',
'pi-km' => 'Pali (Khmer)',
'pi-rm' => 'Pali (Romanic),
'pi-th' => 'Pali (Thai),
'pi-si' => 'Pali (Sinhalese),
'pi-my' => 'Pali (Burmese),
'pl' => 'Polish',
'pt' => 'Portuguese (Portugal)',
'pt-br' => 'Portuguese (Brazil)',
'rm' => 'Rhaeto-Romanic',
'ro' => 'Romanian',
'ro-md' => 'Romanian (Moldova)',
'ru' => 'Russian',
'ru-md' => 'Russian (Moldova)',
'sa' => 'Sanskrit',
'sb' => 'Sorbian',
'si' => 'Sinhalese',
'sk' => 'Slovak',
'sl' => 'Slovenian',
'sq' => 'Albanian',
'sr' => 'Serbian',
'sv' => 'Swedish',
'sv-fi' => 'Swedish (Finland)',
'sw' => 'Swahili',
'sx' => 'Sutu',
'syr' => 'Syriac',
'ta' => 'Tamil',
'te' => 'Telugu',
'th' => 'Thai',
'tn' => 'Tswana',
'tr' => 'Turkish',
'ts' => 'Tsonga',
'tt' => 'Tatar',
'uk' => 'Ukrainian',
'ur' => 'Urdu',
'uz' => 'Uzbek',
'vi' => 'Vietnamese',
'xh' => 'Xhosa',
'yi' => 'Yiddish',
'zh' => 'Chinese',
'zh-cn' => 'Chinese (China)',
'zh-hk' => 'Chinese (Hong Kong SAR)',
'zh-mo' => 'Chinese (Macao SAR)',
'zh-sg' => 'Chinese (Singapore)',
'zh-tw' => 'Chinese (Taiwan)',
'zu' => 'Zulu',
);
$natural = array(
'english' => 'en',
'afrikaans' => 'af',
'arabic' => 'ar',
'assamese' => 'as',
'azerbaijani' => 'az',
'belarusian' => 'be',
'bulgarian' => 'bg',
'bangla' => 'bn',
'catalan' => 'ca',
'czech' => 'cs',
'danish' => 'da',
'german' => 'de',
'divehi' => 'div',
'greek' => 'el',
'spanish' => 'es',
'estonian' => 'et',
'basque' => 'eu',
'persian' => 'fa',
'finnish' => 'fi',
'faeroese' => 'fo',
'french' => 'fr',
'scottish gaelic' => 'gd',
'galician' => 'gl',
'gujarati' => 'gu',
'hebrew' => 'he',
'hindi' => 'hi',
'croatian' => 'hr',
'hungarian' => 'hu',
'armenian' => 'hy',
'indonesian' => 'id',
'icelandic' => 'is',
'italian' => 'it',
'japanese' => 'ja',
'georgian' => 'ka',
'kazakh' => 'kk',
'kannada' => 'kn',
'khmer' => 'km',
'korean' => 'ko',
'konkani' => 'kok',
'kyrgyz' => 'kz',
'lithuanian' => 'lt',
'latvian' => 'lv',
'macedonian' => 'mk',
'malayalam' => 'ml',
'mongolian' => 'mn',
'marathi' => 'mr',
'malay' => 'ms',
'maltese' => 'mt',
'burmese' => 'my',
'norwegian' => 'nb-no',
'nepali' => 'ne',
'dutch' => 'nl-be',
'odia' => 'or',
'punjabi' => 'pa',
'pali' => 'pi',
'pali-khmer' => 'pi-km',
'pali-romanic' => 'pi-rm',
'pali-thai' => 'pi-th,
'pali-sinhalese' => 'pi-si',
'pali-burmese' => 'pi-my',
'polish' => 'pl',
'portuguese' => 'pt',
'rhaeto-romanic' => 'rm',
'romanian' => 'ro',
'russian' => 'ru',
'sanskrit' => 'sa',
'sinhalese' => 'si',
'sorbian' => 'sb',
'slovak' => 'sk',
'slovenian' => 'sl',
'albanian' => 'sq',
'serbian' => 'sr',
'swedish' => 'sv',
'swahili' => 'sw',
'sutu' => 'sx',
'syriac' => 'syr',
'tamil' => 'ta',
'telugu' => 'te',
'thai' => 'th',
'tswana' => 'tn',
'turkish' => 'tr',
'tsonga' => 'ts',
'tatar' => 'tt',
'ukrainian' => 'uk',
'urdu' => 'ur',
'uzbek' => 'uz',
'vietnamese' => 'vi',
'xhosa' => 'xh',
'yiddish' => 'yi',
'chinese' => 'zh',
'zulu' => 'zu',
);
}
{
// Our massive "RFC-1766 => Language string" array:
$codes = array(
'en' => 'English',
'en-au' => 'English (Australia)',
'en-bz' => 'English (Belize)',
'en-ca' => 'English (Canada)',
'en-gb' => 'English (United Kingdom)',
'en-ie' => 'English (Ireland)',
'en-jm' => 'English (Jamaica)',
'en-nz' => 'English (New Zealand)',
'en-ph' => 'English (Philippines)',
'en-tt' => 'English (Trinidad)',
'en-us' => 'English (United States)',
'en-za' => 'English (South Africa)',
'en-zw' => 'English (Zimbabwe)',
'af' => 'Afrikaans',
'ar' => 'Arabic',
'ar-ae' => 'Arabic (U.A.E.)',
'ar-bh' => 'Arabic (Kingdom of Bahrain)',
'ar-dz' => 'Arabic (Algeria)',
'ar-eg' => 'Arabic (Egypt)',
'ar-iq' => 'Arabic (Iraq)',
'ar-jo' => 'Arabic (Jordan)',
'ar-kw' => 'Arabic (Kuwait)',
'ar-lb' => 'Arabic (Lebanon)',
'ar-ly' => 'Arabic (Libya)',
'ar-ma' => 'Arabic (Morocco)',
'ar-om' => 'Arabic (Oman)',
'ar-qa' => 'Arabic (Qatar)',
'ar-sa' => 'Arabic (Saudi Arabia)',
'ar-sy' => 'Arabic (Syria)',
'ar-tn' => 'Arabic (Tunisia)',
'ar-ye' => 'Arabic (Yemen)',
'as' => 'Assamese',
'az' => 'Azerbaijani',
'be' => 'Belarusian',
'bg' => 'Bulgarian',
'bn' => 'Bangla',
'ca' => 'Catalan',
'cs' => 'Czech',
'da' => 'Danish',
'de' => 'German (Germany)',
'de-at' => 'German (Austria)',
'de-ch' => 'German (Switzerland)',
'de-li' => 'German (Liechtenstein)',
'de-lu' => 'German (Luxembourg)',
'div' => 'Divehi',
'el' => 'Greek',
'es' => 'Spanish',
'es-ar' => 'Spanish (Argentina)',
'es-bo' => 'Spanish (Bolivia)',
'es-cl' => 'Spanish (Chile)',
'es-co' => 'Spanish (Colombia)',
'es-cr' => 'Spanish (Costa Rica)',
'es-do' => 'Spanish (Dominican Republic)',
'es-ec' => 'Spanish (Ecuador)',
'es-gt' => 'Spanish (Guatemala)',
'es-hn' => 'Spanish (Honduras)',
'es-mx' => 'Spanish (Mexico)',
'es-ni' => 'Spanish (Nicaragua)',
'es-pa' => 'Spanish (Panama)',
'es-pe' => 'Spanish (Peru)',
'es-pr' => 'Spanish (Puerto Rico)',
'es-py' => 'Spanish (Paraguay)',
'es-sv' => 'Spanish (El Salvador)',
'es-us' => 'Spanish (United States)',
'es-uy' => 'Spanish (Uruguay)',
'es-ve' => 'Spanish (Venezuela)',
'et' => 'Estonian',
'eu' => 'Basque (Basque)',
'fa' => 'Persian',
'fi' => 'Finnish',
'fo' => 'Faeroese',
'fr' => 'French (France)',
'fr-be' => 'French (Belgium)',
'fr-ca' => 'French (Canada)',
'fr-ch' => 'French (Switzerland)',
'fr-lu' => 'French (Luxembourg)',
'fr-mc' => 'French (Monaco)',
'gd' => 'Scottish Gaelic',
'gl' => 'Galician',
'gu' => 'Gujarati',
'he' => 'Hebrew',
'hi' => 'Hindi',
'hr' => 'Croatian',
'hu' => 'Hungarian',
'hy' => 'Armenian',
'id' => 'Indonesian',
'is' => 'Icelandic',
'it' => 'Italian (Italy)',
'it-ch' => 'Italian (Switzerland)',
'ja' => 'Japanese',
'ka' => 'Georgian',
'kk' => 'Kazakh',
'kn' => 'Kannada',
'km' => 'Khmer',
'ko' => 'Korean',
'kok' => 'Konkani',
'kz' => 'Kyrgyz',
'lt' => 'Lithuanian',
'lv' => 'Latvian',
'mk' => 'Macedonian (FYROM)',
'ml' => 'Malayalam',
'mn' => 'Mongolian (Cyrillic)',
'mr' => 'Marathi',
'ms' => 'Malay',
'mt' => 'Maltese',
'my' => 'Burmese',
'nb-no' => 'Norwegian (Bokmal)',
'ne' => 'Nepali (India)',
'nl-be' => 'Dutch (Belgium)',
'nl' => 'Dutch (Netherlands)',
'nn-no' => 'Norwegian (Nynorsk)',
'no' => 'Norwegian (Bokmal)',
'or' => 'Odia',
'pa' => 'Punjabi',
'pi' => 'Pali',
'pi-km' => 'Pali (Khmer)',
'pi-rm' => 'Pali (Romanic)',
'pi-th' => 'Pali (Thai)',
'pi-si' => 'Pali (Sinhalese)',
'pi-my' => 'Pali (Burmese)',
'pl' => 'Polish',
'pt' => 'Portuguese (Portugal)',
'pt-br' => 'Portuguese (Brazil)',
'rm' => 'Rhaeto-Romanic',
'ro' => 'Romanian',
'ro-md' => 'Romanian (Moldova)',
'ru' => 'Russian',
'ru-md' => 'Russian (Moldova)',
'sa' => 'Sanskrit',
'sb' => 'Sorbian',
'si' => 'Sinhalese',
'sk' => 'Slovak',
'sl' => 'Slovenian',
'sq' => 'Albanian',
'sr' => 'Serbian',
'sv' => 'Swedish',
'sv-fi' => 'Swedish (Finland)',
'sw' => 'Swahili',
'sx' => 'Sutu',
'syr' => 'Syriac',
'ta' => 'Tamil',
'te' => 'Telugu',
'th' => 'Thai',
'tn' => 'Tswana',
'tr' => 'Turkish',
'ts' => 'Tsonga',
'tt' => 'Tatar',
'uk' => 'Ukrainian',
'ur' => 'Urdu',
'uz' => 'Uzbek',
'vi' => 'Vietnamese',
'xh' => 'Xhosa',
'yi' => 'Yiddish',
'zh' => 'Chinese',
'zh-cn' => 'Chinese (China)',
'zh-hk' => 'Chinese (Hong Kong SAR)',
'zh-mo' => 'Chinese (Macao SAR)',
'zh-sg' => 'Chinese (Singapore)',
'zh-tw' => 'Chinese (Taiwan)',
'zu' => 'Zulu',
);
$natural = array(
'english' => 'en',
'afrikaans' => 'af',
'arabic' => 'ar',
'assamese' => 'as',
'azerbaijani' => 'az',
'belarusian' => 'be',
'bulgarian' => 'bg',
'bangla' => 'bn',
'catalan' => 'ca',
'czech' => 'cs',
'danish' => 'da',
'german' => 'de',
'divehi' => 'div',
'greek' => 'el',
'spanish' => 'es',
'estonian' => 'et',
'basque' => 'eu',
'persian' => 'fa',
'finnish' => 'fi',
'faeroese' => 'fo',
'french' => 'fr',
'scottish gaelic' => 'gd',
'galician' => 'gl',
'gujarati' => 'gu',
'hebrew' => 'he',
'hindi' => 'hi',
'croatian' => 'hr',
'hungarian' => 'hu',
'armenian' => 'hy',
'indonesian' => 'id',
'icelandic' => 'is',
'italian' => 'it',
'japanese' => 'ja',
'georgian' => 'ka',
'kazakh' => 'kk',
'kannada' => 'kn',
'khmer' => 'km',
'korean' => 'ko',
'konkani' => 'kok',
'kyrgyz' => 'kz',
'lithuanian' => 'lt',
'latvian' => 'lv',
'macedonian' => 'mk',
'malayalam' => 'ml',
'mongolian' => 'mn',
'marathi' => 'mr',
'malay' => 'ms',
'maltese' => 'mt',
'burmese' => 'my',
'norwegian' => 'nb-no',
'nepali' => 'ne',
'dutch' => 'nl-be',
'odia' => 'or',
'punjabi' => 'pa',
'pali' => 'pi',
'pali-khmer' => 'pi-km',
'pali-romanic' => 'pi-rm',
'pali-thai' => 'pi-th',
'pali-sinhalese' => 'pi-si',
'pali-burmese' => 'pi-my',
'polish' => 'pl',
'portuguese' => 'pt',
'rhaeto-romanic' => 'rm',
'romanian' => 'ro',
'russian' => 'ru',
'sanskrit' => 'sa',
'sinhalese' => 'si',
'sorbian' => 'sb',
'slovak' => 'sk',
'slovenian' => 'sl',
'albanian' => 'sq',
'serbian' => 'sr',
'swedish' => 'sv',
'swahili' => 'sw',
'sutu' => 'sx',
'syriac' => 'syr',
'tamil' => 'ta',
'telugu' => 'te',
'thai' => 'th',
'tswana' => 'tn',
'turkish' => 'tr',
'tsonga' => 'ts',
'tatar' => 'tt',
'ukrainian' => 'uk',
'urdu' => 'ur',
'uzbek' => 'uz',
'vietnamese' => 'vi',
'xhosa' => 'xh',
'yiddish' => 'yi',
'chinese' => 'zh',
'zulu' => 'zu',
);
}
// Maybe they can change the displayed language of the post?
if (!empty($message['SOSL_lang']) && count($message['SOSL_lang']) > 1)
{
echo '
<select id="SOSL_msg', $message['id'], '" onChange="return SOSL_change(this);" >';
foreach ($message['SOSL_lang'] as $lang)
echo '
<option value="SOSL_', $message['id'], '_' . $lang . '"', ($message['SOSL_primary'] == $lang ? ' selected="selected"' : ''), '>', SOSL_langName($lang), '</option>';
echo '
</select>
<script type="text/javascript">
document.getElementById("SOSL_msg', $message['id'], '").value = "SOSL_', $message['id'], '_', $message['SOSL_primary'], '";
</script>';
}