Skip to content

Instantly share code, notes, and snippets.

@spoo-bar
spoo-bar / ResourceProvider.cs
Last active May 9, 2019 11:51
A custom translated resource text provider
internal class ResourceProvider : IResourceProvider
{
public IResourceReader ResourceReader => null;
public object GetObject(string resourceKey, CultureInfo culture)
{
if (culture.LCID == 1025) //1025 - Arabic
return "مرحبا";
else if (culture.LCID == 1036) //1036 - French
@spoo-bar
spoo-bar / UpdateResx.cs
Last active May 9, 2019 12:24
Updating the resource files programatically
using System.Resources;
var resxFilePath = @".\XyzResources.fr.resx";
var resourceKey = "greetingText";
var resourceString = "Bonjour";
if (File.Exists(resxFilePath))
{
using (var resourceWriter = new ResXResourceWriter(resxFilePath))
{
@spoo-bar
spoo-bar / cosmos-windows.md
Last active May 12, 2024 11:39
A guide to run a cosmos sdk based chain on Windows natively

Cosmos on Windows

By the end of this guide, you will be running a Cosmos chain on your local machine. We will start with the assumption that you are on a clean fresh new Windows10/11 system.

We will be using Powershell as our terminal and not Command Prompt. I highly recommend you install Windows Terminal app. You can download it here from the Windows Store

❗This guide has not yet been tested with chains which use x/wasmd (Cosmwasm).

There are two ways to get Cosmos chains running on Windows.