<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Nuss93</title>
    <description>The latest articles on DEV Community by Nuss93 (@nuss93).</description>
    <link>https://dev.to/nuss93</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F669981%2F80b726e4-9dc4-48d8-b92d-959f8bd6f90d.png</url>
      <title>DEV Community: Nuss93</title>
      <link>https://dev.to/nuss93</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nuss93"/>
    <language>en</language>
    <item>
      <title>Nasreen is still coding in 2022</title>
      <dc:creator>Nuss93</dc:creator>
      <pubDate>Tue, 08 Mar 2022 07:35:46 +0000</pubDate>
      <link>https://dev.to/nuss93/nasreen-is-still-coding-in-2022-1ad9</link>
      <guid>https://dev.to/nuss93/nasreen-is-still-coding-in-2022-1ad9</guid>
      <description>&lt;h2&gt;
  
  
  Happy IWD to all my lady coders!
&lt;/h2&gt;

&lt;p&gt;Programming and coding, the things that used to make me curl up and cry in the study room of my university back in 2016. Now, I can't believe I am coding in 2022.&lt;/p&gt;

&lt;p&gt;This year, I wish to dive a lot more into AR, VR and Game Development. I want to be able to create 3D models using software like Blender and use them as assets in the games I develop. I hold on to my 2022 mantra, which is to become &lt;strong&gt;a jack of all trades, a master of none. But still better than a master of one.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In 2022, I've achieved so much I've given Game Dev on Unity a try, and I can say that it is quite addicting. The learning process is so much fun!&lt;/p&gt;

&lt;p&gt;Besides ReactJS, I've also managed to pick up on React Native and also equipped myself with the MERN stack.&lt;/p&gt;

&lt;h2&gt;
  
  
  Breaking the bias 👩🏻‍💻
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Be more confident! There is no room for impostor syndrome here.&lt;/li&gt;
&lt;li&gt;Speak up! When you have great ideas, if something doesn't feel right to you, speak up.&lt;/li&gt;
&lt;li&gt;Become an inspiration and role model to all the girls who want to code. I want to come out as a strong person who has got her s*it together, and that other women can do the same if we put our minds to it!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's not easy being a female coder and trying to set my reputation. I've always have to work twice as hard to gain the respect of people around me, peers or clients.&lt;/p&gt;

&lt;p&gt;Now, my team consists of a lot of female coders and I wish to create a safe space for more girls to grow and achieve their dream without the having to go through so much discrimination and bias.&lt;/p&gt;

&lt;h2&gt;
  
  
  Advocating for myself 💪🏼
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Not selling myself short. Despite being scared of the tech industry, I will try my best to speak up on things I believe in.&lt;/li&gt;
&lt;li&gt;Being mindful of my current state and acknowledging that I have been making progress regardless of the self-doubt.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  I pledge to support women, non-binary folks, and other minorities in tech by…
&lt;/h2&gt;

&lt;p&gt;Being a model representation that they can do it as much as I could!&lt;/p&gt;

&lt;h2&gt;
  
  
  Keeping things exciting for me and my team ✨
&lt;/h2&gt;

&lt;p&gt;Trying new things! I can't wait to fully understand the basics of Game Development, AR and VR. Perhaps one day I would be able to create something impactful for the community and prove that women can go into tech!&lt;/p&gt;

</description>
      <category>wecoded</category>
      <category>womenintech</category>
      <category>breakthebias</category>
    </item>
    <item>
      <title>How to localise your ReactJS apps with i18next — but you're using Class Components</title>
      <dc:creator>Nuss93</dc:creator>
      <pubDate>Wed, 22 Dec 2021 10:47:46 +0000</pubDate>
      <link>https://dev.to/rekastudios/how-to-localise-your-reactjs-apps-with-i18next-but-youre-using-class-components-1ac2</link>
      <guid>https://dev.to/rekastudios/how-to-localise-your-reactjs-apps-with-i18next-but-youre-using-class-components-1ac2</guid>
      <description>&lt;p&gt;You want to localise your React Apps and add multiple language options to your app, but your app was built years ago when class components were still a thing. You've searched through tutorials to set up localisation on your app, but a lot of tutorials out there mostly explain in the context of functional components, and the React team said that there is no need to make the swap form class to functional components as it will never deprecate.&lt;/p&gt;

&lt;p&gt;This article will cover the basics for adding multiple languages to your React app.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Install the relevant dependencies
&lt;/h2&gt;



&lt;p&gt;&lt;code&gt;npm install i18next react-i18next i18next-browser-languagedetector --save&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Create a js file to store your translations
&lt;/h2&gt;

&lt;p&gt;Let's call this file &lt;code&gt;i18n.js&lt;/code&gt;. This will be where all the translations are stored&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import i18n from "i18next";

i18n.init({
    resources : {
        en : {
            translations : {
                Dashboard_PageHeader_Title : "This is the title in english",
                Dashboard_PageHeader_Body : "This is the body in english"
            }
        },
        my : {
            translations : {
                Dashboard_PageHeader_Title : "Ini adalah tajuk dalam Bahasa Malaysia",
                Dashboard_PageHeader_Body : "Ini adalah perenggan bawah dalam Bahasa Malaysia"
            }
        }
    },
    fallbackLng: "en",
    debug: true,

    // have a common namespace used around the full app
    ns: ["translations"],
    defaultNS: "translations",

    keySeparator: false, // we use content as keys

    interpolation: {
        escapeValue: false, // not needed for react!!
        formatSeparator: ","
    },

    react: {
        wait: true
    }
})
export default i18n;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Import the i18n file and pass it as a prop to I18nextProvider and wrap the entire application with the provider component
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Import files at the top of your file
// Localisation module
import { I18nextProvider } from "react-i18next";
import i18n from "./i18n";

...

// in render
render() {
        const { authenticated, loading } = this.state;
        if (loading) return &amp;lt;div style={{ background: '#000080' }}&amp;gt;&amp;lt;div className="loading-screen"&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;

        return (
            &amp;lt;HashRouter&amp;gt;
                &amp;lt;I18nextProvider i18n={i18n}&amp;gt;
                    &amp;lt;Switch&amp;gt;
                        &amp;lt;Route path="/login" render={(props) =&amp;gt; &amp;lt;LoginPage /&amp;gt;} /&amp;gt;
                        &amp;lt;PrivateRoute path="/" component={RealDashboard} authenticated={authenticated} /&amp;gt;
                    &amp;lt;/Switch&amp;gt;
                &amp;lt;/I18nextProvider&amp;gt;
            &amp;lt;/HashRouter&amp;gt;
        )
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now that we are done with setting up your app to have multiple language, we need to set up changing the language settings, and then extract the language as your content.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Change the language
&lt;/h2&gt;

&lt;p&gt;You may have a dropdown, radio button or any kind of form for the user to change language. Wherever you choose to call the function to change language, you do so as the following :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// top of file
import { withTranslation } from 'react-i18next';

...

// update your language in your component
class HeaderLanguageSelect extends Component {
    state = { value : 'en' }

    updateLanguage = () =&amp;gt; {
        let newlang = this.state.value;
        this.props.i18n.changeLanguage(newlang);
        this.props.toggleModal();
    }
    render(){
        return{ your code here }
    }
}

// export default your component run through withTranslation imported above
export default withTranslation()(HeaderLanguageSelect)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  5. Displaying the language
&lt;/h2&gt;

&lt;p&gt;This step is almost similar to step 4, but you call the &lt;code&gt;t&lt;/code&gt; as props and refer to the key corresponing to the content defined in your &lt;code&gt;i18n.js&lt;/code&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// top of file
import { withTranslation } from 'react-i18next';

...

// update your language in your component
class Dashboard extends Component {
    render(){
        return(
            &amp;lt;div&amp;gt;{this.props.t('Dashboard_PageHeader_Body')}&amp;lt;/div&amp;gt;
        )
    }
}

// export default your component run through withTranslation imported above
export default withTranslation()(Dashboard)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;And that's pretty much it! Hope it helps :)&lt;/p&gt;

</description>
      <category>react</category>
      <category>localization</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
