WSN Links https://scripts.webmastersite.net/wsnlinks/manual en-us Language Images Using custom images for each language. https://scripts.webmastersite.net/wsnlinks/manual/multilingual-issues/language-images-295.html Tue, 21 Jun 2005 09:36:13 GMT https://scripts.webmastersite.net/wsnlinks/manual/multilingual-issues/language-images-295.html
If you must, however, create a new directory /templates/images_languagename , where 'languagename' is the name of your language file in the /languages/ directory (without the .lng). Once that directory is uploaded, the images in it will be used in place of the default images of the active style when using that language.]]>
Using multiple languages for fields How to make each category and listing available in multiple languages seamlessly. https://scripts.webmastersite.net/wsnlinks/manual/multilingual-issues/using-multiple-languages-for-fields-220.html Sun, 15 Aug 2004 16:40:42 GMT https://scripts.webmastersite.net/wsnlinks/manual/multilingual-issues/using-multiple-languages-for-fields-220.html For true mutlilingual support, you may want to have listing and category info in several languages and display in the appropriate language for each visitor. As of the 9.0.14 release, this is handled automatically for category names and descriptions and listing names and descriptions. Note that if the currently selected language isn't available for a category/listing, the version in your default language (as set at Admin -> Customizations -> Language) will be shown.

To apply to other fields, or for older versions, read on. New listing fields of the form languagenametitle and languagenamedescription will be automatically displayed as the value for {LINKTITLE} and {LINKDESCRIPTION} when the languagename language is selected and we're not on the add/edit pages. For example, the value of the field spanishtitle will automatically show as a link's title when browsing in Spanish. If a translation is not available for the user's selected language, the regular field's content will be shown (fallback is automatic).

Important: Make sure you decide which of your languages is the default language, and only add new fields for non-default languages. Let the default language use the standard fields.

For Additional Link Fields In WSN 9.0+

Go to Admin Panel -> Listings -> Link Fields and click "Add New Link Field" at the top. Fill out the selections to match the standard version of the field (check the edit field page for the standard field), but specify in the title/description which language it's for. Then in the "Template Variable:" area be sure to change the template variable name to LANGUAGENAMEFIELDNAME -- so for a Spanish listing title, use SPANISHTITLE.

If you're translating the listing description field, you'll need to make a few changes to the custom input html. Start by copying the standard field code:

<textarea name="description" id="description" class="submitdescription">{LINKEDITORCONTENT[description]}</textarea>
<p class="charsleft"><span id="counter_description">{LINKDESCRIPCHARSLEFT}</span> {LANG_SUGGESTLINK_CHARSLEFT}</p>
<IF {SWITCH_WYSIDESCRIP}><p class="editormodeops"><select name="editormode">{EDITORMODEOPS}</select></p></IF>

Then bulk replace every instance of description with spanishdescription (or yourlanguagedescription), and finally change class="submityourlanguagedescription" back to class="submitdescription".

For Other Types of Fields, or Earlier Versions

Go to Admin Panel -> Customizations -> Add Fields and add new fields for each language/field you want to make multilingual. You're most likely to want to do title and description for links and then name and description for categories.

For an example, to have French versions of the category names and descriptions go to Admin Panel -> Customizations -> Add Fields and add the category fields french_name and french_description (assuming the language pack is named languages/French.lng).

If you're doing listing description fields for different languages, you'll want to have the WYSIWYG editor and character counter just like the regular description field. The basic textarea you get by adding your custom field doesn't get you that, so remove that textarea from your custom fields template. Then, copy the description code from the submit/edit templates:
<tr>
<td class="labelscolumn"><span class="labels">{LANG_GENERAL_DESCRIPTION}:</span>
<IF {LINKSMILIESALLOWED} or {LINKCODESALLOWED}>
<ul>
<IF {LINKCODESALLOWED}><li>{LANG_GENERAL_USECODES}</li></IF>
<IF {LINKSMILIESALLOWED}><li>{LANG_GENERAL_USESMILIES}</li></IF>
</ul>
</IF>
<IF {SWITCH_WYSIDESCRIP}><p class="center"><select name="editormode">{EDITORMODEOPS}</select></p></IF>
</td>
<td class="optionscolumn">
<textarea name="description" id="description" class="submitdescription">{LINKEDITORCONTENT[description]}</textarea>
<p class="charsleft"><span id="counter">{LINKDESCRIPCHARSLEFT}</span> {LANG_SUGGESTLINK_CHARSLEFT}</p>
</td>
</tr>


You'll need to make a few changes to this to adapt it to your new field to use it with the frenchdescription field:


  • Change {LANG_GENERAL_DESCRIPTION} to {LANG_CUSTOM_FRENCHDESCRIPTION} after adding the custom_frenchdescription language item (so that it'll say "French Description" instead of just "Description").
  • Bulk-replace every instance of description with frenchdescription.
  • Change <p class="charsleft"> to <p class="charsleft_frenchdescription">
  • Change <span id="counter">{LINKDESCRIPCHARSLEFT}</span> to <span id="counter_frenchdescription">{LINKDESCRIPCHARSLEFT[frenchdescription]}</span>
  • Change maxlen to maxlen_frenchdescription

Completed frenchdescription example:

<tr>
<td class="labelscolumn"><span class="labels">{LANG_CUSTOM_FRENCHDESCRIPTION}:</span>
<IF {LINKSMILIESALLOWED} or {LINKCODESALLOWED}>
<ul>
<IF {LINKCODESALLOWED}><li>{LANG_GENERAL_USECODES}</li></IF>
<IF {LINKSMILIESALLOWED}><li>{LANG_GENERAL_USESMILIES}</li></IF>
</ul>
</IF>
<IF {SWITCH_WYSIDESCRIP}><p class="center"><select name="editormode">{EDITORMODEOPS}</select></p></IF>
</td>
<td class="optionscolumn">\n<textarea name="frenchdescription" id="frenchdescription" class="submitdescription">{LINKEDITORCONTENT[frenchdescription]}</textarea>
<p class="charsleft_frenchdescription"><span id="counter_frenchdescription">{LINKDESCRIPCHARSLEFT[frenchdescription]}</span> {LANG_SUGGESTLINK_CHARSLEFT}</p>
</td>
</tr>


You'll likely want to place your alternate language descriptions right below the main language description in the submit listing and edit listing templates.

You can also make multilingual category description fields use WYSIWYG by copying the standard description from the submit category/edit category templates and making the same changes.

Note that the multiple-language character counter only works since WSN 8.0.14, and the WYSIWYG character counter since 8.0.0.

]]>
Language Variables Guide to using language variables. https://scripts.webmastersite.net/wsnlinks/manual/multilingual-issues/language-variables-595.html Sun, 16 May 2004 12:44:22 GMT https://scripts.webmastersite.net/wsnlinks/manual/multilingual-issues/language-variables-595.html
Language template variables can be customized in the Admin -> Customizations -> Language area of your admin panel. You can add new ones there or change the content of existing ones.

Displaying a languge item is simple. In any template, type {LANG_ followed by the name of the language variable. For example, {LANG_YES} written in the template will show your visitors the word 'yes' if you're using the english language pack.

Whenever you see a {LANG_ in a template, you can look it up at Admin -> Customizations -> Language.

Besides language variables for text, you can use different images for each language and learn how to submit the same listing in multiple languages and have it display in the viewer's language. You may also want to learn how set language via link.]]>
Setting Language via Link Creating links to change the current language, optionally with national flag images. https://scripts.webmastersite.net/wsnlinks/manual/multilingual-issues/setting-language-via-link-151.html Tue, 06 Jan 2004 23:18:12 GMT https://scripts.webmastersite.net/wsnlinks/manual/multilingual-issues/setting-language-via-link-151.html
Sometimes you may want to replace the language selector with a set of text or graphical hyperlinks. Here's an example of how to do that:
<a href="index.php?action=setlanguage&returnto={CURRENTURLENCODED}&languagegroup=English">English</a> <a href="index.php?action=setlanguage&returnto={CURRENTURLENCODED}&languagegroup=Spanish">Spanish</a>

To use national flag images, place this HTML in your template (presumably the wrapper) where you want it, perhaps in the spot currently occupied by the language selector:
<a href="index.php?action=setlanguage&returnto={CURRENTURLENCODED}&languagegroup=English"><img src="{IMAGESURL}/flags/us.png" ></a>
<a href="index.php?action=setlanguage&returnto={CURRENTURLENCODED}&languagegroup=Spanish"><img src="{IMAGESURL}/flags/es.png" ></a>

Repeat for each language you have.]]>
Multilingual vs. English-Only Points to consider in making the choice. https://scripts.webmastersite.net/wsnlinks/manual/multilingual-issues/multilingual-vs-english-only-598.html Thu, 25 Sep 2003 15:03:06 GMT https://scripts.webmastersite.net/wsnlinks/manual/multilingual-issues/multilingual-vs-english-only-598.html
Some points to consider:

  • You can install multiple languages.
  • If you plan to distribute a theme to others, be sure you're using multilingual. English-only themes are autogenerated from multilingual, but not vice versa.
  • Multilingual takes the language out of the templates. The result is that templates are filled with language variables and not as easy to read, however chaning language is quicker since it's done all at once through the language section, and you can handle two languages with the same templates.
  • The templates used by the multilingual version can be found in your templates/multilingual directory. English-only templates are in templates/default.
  • Even with English-only, there will still be items in your language section. These include outgoing emails, page titles, and various other things which cannot logically fit into a template.
  • English-only templates are much easier to recogize and find your way around in since all the text is written in directly... however you will tend to lose more of your customized text on upgrades because of this.
  • If you edit your templates offline in a WYSIWYG editor such as FrontPage or DreamWeaver, it will be much more comprehensible with the English-only templates due to the smaller number of template variables.
]]>