Using ASP Localization with Angular2 +

You already have a ASP.Net project with Localization all set up and localized. Sure, you could convert the resx files and use Internationalization (i18n) built into Angular 2+. Well, another option is to keep the whole setup the same, and still let the server-side handle everything. This small tutorial won’t go over date and time, only string localization. Keep in mind you will not be loading all languages, rather only the one the browser is set to. So if for reasons you wanted to load all languages, for example, no refresh language change, this approach will need some modifications.

The prereqs are that you already have a project set up with your localization file already being used. An example is on any cshtml page, you should simply be able to localize using LocalizationProjectName.The_Key. Moving on, you also have an angular 2+ project already set up. If you don’t, you could use a seed project to test this out.

Read More

Advertisements

Visiting Melbourne – The City

Melbourne, one of the largest cities in Australia, and a place I have completely fallen in love with! Our first stop? Our hotel with a view! Apartments Melbourne Domain – CBD Paris End on 27 Little Collins Street.

DSC00007

Check-in was straightforward, no hassles whatsoever. Other amazing views were the St Patrick’s Cathedral & The Parliament Building.

Read More

Visiting Melbourne – The Great Ocean Road

We slept at 2am and had to wake up by 7am? Not happening. Although we had these glorious plans of waking up early, having amazing breakfast, then heading out to the stop where our bus would pick us up from…I guess things don’t always go as planned. Our morning started off with getting to breakfast 30min before our pickup time for the tour. No time to relax and enjoy the meal, which we could have done since the bus was nearly 30 minutes late anyway. Ah well.

Due to stuff, everything started off 30-60minutes late with the tour. However, our guide (let’s call him R…I’m pretty bad at remembering names, sorry) did a pretty good job catching up. The second problem of the day was a mixup for the location of our lunch. So instead of backtracking, R decided to go another hour, to a different location for lunch.

We finally reach our first stop on this trip —Kafe KoalaKennett River. We get to eat lunch…and play with birds and see the Koalas…real close.

Read More

Salt Pans of Botswana Day 2 – Makgadikgadi Pans

In case you missed it, here’s day 1 of this trip. Mornings include getting up, brushing your teeth (or eating food first…no one’s judging), freshening up in general, and having breakfast. So did ours, plus a good 30 minutes of taking pictures of everyone. Each tent had a small foldable bucket filled with hot water. Outside was super cold, so that hot water plus the fire pit really does feel nice.

Our goal for the day? To see as many animals as possible — especially cats! Day 1 was ok, but I guess everyone wanted to see at least one cat. We head back to the man-made waterhole one more time to see if we get lucky there. No luck, sadly. So next stop? Makgadikgadi Pans! Read More

Salt Pans of Botswana Day 1 – Nxai Pans

It’s 4am as we prepare to leave for an adventure into the salts, which was my first time even though I’ve lived in this country for 17 years! And like every trip I’ve had with family and family friends, this too, was following the “Indian Standard Time.” The idea was to get make sure the safari cars meet us there by 4:30AM so we can leave by 5AM. Instead 4:30 is when some of our friends were waking up…ah well. We did finally leave by 6AM though haha. As the drive starts, it gets cold…really cold. Since the car is open, the air is chill, and we are moving relatively fast.

Read More

Sunset Boat Ride in Maun, Botswana

I’m currently in Maun, Botswana (parents live here) and thought I would share, in a series of blog posts, things to do here 🙂 For my first post, let’s take a boat ride to see the sunset of Botswana! There are many places which take you on a boat ride down the Thamalakane River, which connects to the Okavango Delta. An example is the Old Bridge Backpackers, or what I used in my case, Island Safari Lodge. You can’t go wrong with many of the options available. Whether it’s a two-hour trip to see the sunset or a long day trip into the Okavango Delta.

Read More

Angular 2 CLI – Extract Hash Value

Hey, all! In this post, I’m just going to quickly show you how you could extract the hash that’s generated using angular 2’s CLI to build with the any of the productions build flags.

ng build --target=production --environment=prod
ng build --prod --env=prod
ng build --prod

For starters, why does cli add this random string in the generated files? The simple answer is what we call cache-busting. Leaving what cache is, and what it means to cache-bust for you to research on your own. So it’s great and all, but even if you’re using the cli, you’re not necessarily using its index.html file for anything. You might have your own way of inserting these generated files into your application. Which also means you’ll need to know the file name.

Read More