Support > International Support

Translating block titles, custom block contents and custom SP pages

(1/4) > >>

andy:
I've been unable to find anything about translating the names of blocks (and html contents) or custom pages created in simple portal, and their titles - can you tell me where I can translate them?

Another one isn't really SP but related ... translating the custom menu items.


New to SMF and SP.
Andy

AngelinaBelle:
I am not sure I understand your question.  I will give some information.  If this does not answer your question, please ask some more.  Please be specific.
 
* You can install different language packs for SMF, and for SimplePortal. SimplePortal language packs are available at http://simpleportal.net/index.php?action=downloads;area=cat2;d64a17a12a=b415fb8cf24f5bbc52bc5ebd9ca81255
 
* If you wish to create a new language pack for your language, please ask here. SimplePortal.net has a tool to make this a little easier than editing the files directly.
 
* The files are all found in Themes/default/Languages/SPortal*.*.php
 
I hope this helps.

andy:
No... I already have the JP language pack for SMF and SP.

I have a site with 2 languages; English and Japanese. I'm moving from a Joomla based site to SMF with a portal but need all SP content - new block titles I make, block HTML content, custom pages, menu tabs etc, to be displayed in both languages when they are switched. At the moment these are only in English.
Right now it is a halfway house with Joomla providing the information pages with SMF in a wrapper. SSI hasn't worked well in Joomla blocks and there is no sync in the languages so I want to use an SMF portal.
http://outdoorclubjapan.com/

I've been testing SMF with Simple Portal here (the one I want to translate):
http://paddington-school.com/smf/

http://paddington-school.com/smf/index.php?language=japanese-utf8

The layout is not final in anyway but you can see that even when the browser detects Japanese and displays the site, all the block titles, contents, pages added in SP that I made, are still in English. I don't know where to access the language strings for these - if there are any. Or where to place equivalent Japanese utf-8 files - something like that standard files like SMF agreement.
Examples:
Left top block: 'Events and Discussion ' ... how to translate title to Japanese.
Information menu tab: Introduction, Event grade and safety.


Andy

AngelinaBelle:
Now I think I understand your question.
You wish to have the block titles change depending on the language selected by the user.
 
SimplePortal does not provide a way to do that.
 
For blocks where you want to provide translations of HTML content, I will suggest that you can do it in the way that SMF and SimplePortal provide "strings" in many different languages.
 
* Instead of an HTML block for Welcome to OCJ, use a php block.
* Instead of the first 3 paragraphs, you would use $txt['OCJ-intro'], instead of the list, you can use $txt['OCJ-list'], instead of the Please Click Here for Japanese text, you can use $txt['OCJ-switchlanguages'] .... and so on.
* Pick a file to keep them in. Then keep them at the bottom of the appropriate-language versions of that file.
* In your php block, you would be echoing a little always-the-same HTML (for the same logo each time, for example), setting up things like lists, and then stringing together your translated strings. Depending on which language is loaded, you will have that version of your strings loaded.
 
For the block titles, my best advice to you for now is to put both titles, where possible, or leave the titles off where possible.
 
It would take a customization of Simpleportal code to allow using $txt strings in the block titles. Which would first take figuring out a sensible syntax for doing that.
 
This would make a good feature request, I think.
Your website is a good example of someone trying to build a multi-lingual portal page.

andy:
Doesn't sound too bad... I will have a go. And you are right the block titles can be done in both languages for most of them - its not a big deal.

One of the big things still outstanding are the pages and menus. Can they be switched if the language is changed?
I don't know what to name the file or where to put it, say for example:
http://paddington-school.com/smf/index.php?page=page3950
This is one of the custom pages made via SP.

Thanks.
Andy

Navigation

[0] Message Index

[#] Next page

Go to full version