This commit is contained in:
Gerard Gascón 2025-04-24 17:19:36 +02:00
commit 001bb14f16
951 changed files with 270074 additions and 0 deletions

View file

@ -0,0 +1,17 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class FindLanguageSelector : MonoBehaviour{
public Dropdown dropdown;
private void Start(){
dropdown.value = PlayerPrefs.GetInt("Language");
}
public void OnLanguageChange(int languageSelected){
PlayerPrefs.SetInt("Language", languageSelected);
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: bc27923aab962ab4e8260d428699d3b0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,38 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ImageTranslator : MonoBehaviour{
public GameObject englishText;
public GameObject spanishText;
int language;
// Start is called before the first frame update
void OnEnable(){
language = PlayerPrefs.GetInt("Language");
if (language == 0){
englishText.SetActive(true);
spanishText.SetActive(false);
}
if (language == 1){
englishText.SetActive(false);
spanishText.SetActive(true);
}
}
// Update is called once per frame
void Update(){
if (language == 0){
englishText.SetActive(true);
spanishText.SetActive(false);
}
if (language == 1){
englishText.SetActive(false);
spanishText.SetActive(true);
}
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 91f94dc2fb68f8446be28428dad9700f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,26 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using TMPro;
public class TextTranslator : MonoBehaviour{
[TextArea] public string englishText;
[TextArea] public string spanishText;
int language;
TextMeshProUGUI text;
// Start is called before the first frame update
public void OnEnable(){
text = GetComponent<TextMeshProUGUI>();
language = PlayerPrefs.GetInt("Language");
if (language == 0){
text.text = englishText;
}
if (language == 1){
text.text = spanishText;
}
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8c57de335859cbd498fb9ed39931f3c9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: