New add-on for creating multi-languages sites with Pulse CMS 4


#1

I am happy to announce the release of Localizer add-on for Pulse 4. With Localizer, you are able to create true multi-language sites without the need of duplicating the whole website.

Localizer is easy to use and works exactly like the block tag.

Demo: http://pulselocalizer.instacks.com (see Change Language navigation item on right hand side).

Tutorial and purchase: http://pulselocalizer.instacks.com/tutorial

Happy pulsing :slight_smile:


#2

@instacks Great Work! :+1:


#3

Really great work and very useful to a lot of people out there :zap:

It seemed clear after this blog post (https://www.pulsecms.com/blog-65-multi-lingual-sites-in-pulse) that users wanted true multi-lingual capabilities from within Pulse and using Blocks. Great advancement and really easy to work with.

This should make its way onto the Pulse site very soon… :+1:


#4

can i set autoswitch language based on country IP?


#5

I don’t think that’s possible yet but am sure could be possible.
That’s not always good.

E.g. I’m in Japan but want a site in English. So best to set based on Browser Language then have this drop down as a back up / optional


#6

Browser language based might be better, you are right.


#7

And browser language detection is already in. This should do the job already for 80% of the use cases.

The navigation items (leading to URL parameter locale=de for example) to change the language are only optional. :slight_smile:


#8

Great! This is exactly the perfect UX flow.
Great job :sunglasses:


#9

This is so great, this was on my wishlist for so long and now here it is, and with so little code, unbelievable clever.
What I dit was set the default language in the nav like so: href="?locale=nl"

on line 5 in local-init.php
$locale = “nl”;

and on line 28 like so
if (strlen($locale) == 0) {
$locale = “nl”;
}


#10

Great solution @Mary ! Thanks for sharing it :slight_smile:


#11

Now I have only one hurdle to go, the menu’s have to be in the blocks too, and I happen to have highlight current menu-items based on php, in the blocks the php is stripped out, so now I have to change that to a nice js…


#12

@Mary

Try replacing your Block with a Super-Block, that way you can use PHP or JScript inside a Block.


#13

@boisdejardin, I have pulse3 in most of my projects, (plan to leave pulse3 as soon as pulse5 is out,) could you tell me info where to find info about those superblocks…? Was searching but couldn’t find it…:confused:


#14

Hello @Mary,

I’m sure that this is also a feature in Pulse version 3 but I could not find the version 3 documentation on the Pulse website to verify it. So I have tried it myself before writing this answer.

The following text is a modified version of the Pulse 4 Blocks documentation :

Super blocks are like regular blocks with two differences. First the WYSIWYG editor is replaced by a plain text editor. This editor will not adapt the content of your file while saving. Second, you can have code such as PHP and JS in the block. To create a Super Block, just create a new block and prefix the name with ‘sb_’, for example ‘sb_date’.

Use for instance as content : <?php echo date("l jS of F Y h:i:s A"); ?>

Integrate this Block as normal on a page with its full name (sb_date.html)

Good luck (Veel succes :thumbsup:)


#15

Ooooh, really?? Only add sb_ ? Gonna try this right now, that is a great help, dankjewel!


#16

What about that then…:confused: Might have understood that wrong, I did a test with a nav-menu with php-highlight-current-page in a SuperBlock and now also that translates along with the rest, hooray! You made my day!


#17

No longer Confused ?

The Pulse WYSIWYG editor is clever, I do find it to clever sometimes.

Positive : It tries to repair incomplete HTML tags like adding a missing P-tag.
Negative : It will replace HTML character codes with their result values. For instance the HTML code for euro will be replaced by the euro sign and the Non-Breaking-Space becomes useless because it will be replaced with the standard space character. PHP code will be converted into HTML comments.

My advise : Use Super_Blocks for everything where you need a bit of code in your text !


#18

No thanks a lot! I certainly will use SB more, I had heard of it, or read somewhere about it here ,but I didn’t know it was that easy.
About the wysiwyg editor, I always have to place a fake classname in a span tag because otherwise it is stripped out.
Non breaking space, you mean, nbsp?


#19

Hello @Mary,

Glad you like it.

Yes, I meant &nbsp; in my opinion a very usefull HTML character code.

I know that somehow you can modify the features of Redaktor, the Pulse WYSIWYG editor, but to me it did not look very straightforward. Besides that, the modifications will be gone after a Pulse update.


#20

@boisdejardin, very usefull, &euro;&nbsp; so that it all stays nicely together :grin: and who knows, the makers of redactor modifies it and it comes along with an update…