Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -62,6 +62,9 @@ def pull_obsolete_codes(iso_code):
|
|
62 |
#st.write(f"langcodes found the following tag: {type(found)}") # a Language object
|
63 |
if lang is not None:
|
64 |
display = lang.display_name()
|
|
|
|
|
|
|
65 |
st.write("## Results")
|
66 |
st.write(f"Best-match BCP-47 tag for '{langtext}', according to the langcodes library: {lang}")
|
67 |
st.write(f"Breakdown of tag components:")
|
@@ -72,7 +75,7 @@ if lang is not None:
|
|
72 |
|
73 |
|
74 |
st.write("## Further Information:")
|
75 |
-
|
76 |
st.write(f"Broader tags for this language, if any:")
|
77 |
st.write(broader_tags)
|
78 |
st.write(f"Try also: https://r12a.github.io/app-subtags/?lookup={lang}")
|
@@ -80,8 +83,7 @@ if lang is not None:
|
|
80 |
|
81 |
# ethnologue prefers T for german (deu), and T for French
|
82 |
st.write("## Older Codes")
|
83 |
-
|
84 |
-
t_variant = lang.to_alpha3(variant='T')
|
85 |
st.write(f"ISO 639-3 'alpha3' code, 'terminology' variant (deprecated): {t_variant}")
|
86 |
st.write(f"ISO 639-3 'alpha3' code, 'bibliographic' variant (deprecated): {b_variant}")
|
87 |
st.write(f"If it exists, the ISO 639 Code Tables entry for the T variant would be at https://iso639-3.sil.org/code/{t_variant}")
|
|
|
62 |
#st.write(f"langcodes found the following tag: {type(found)}") # a Language object
|
63 |
if lang is not None:
|
64 |
display = lang.display_name()
|
65 |
+
b_variant = lang.to_alpha3(variant='B')
|
66 |
+
t_variant = lang.to_alpha3(variant='T')
|
67 |
+
broader_tags = lang.broader_tags()
|
68 |
st.write("## Results")
|
69 |
st.write(f"Best-match BCP-47 tag for '{langtext}', according to the langcodes library: {lang}")
|
70 |
st.write(f"Breakdown of tag components:")
|
|
|
75 |
|
76 |
|
77 |
st.write("## Further Information:")
|
78 |
+
|
79 |
st.write(f"Broader tags for this language, if any:")
|
80 |
st.write(broader_tags)
|
81 |
st.write(f"Try also: https://r12a.github.io/app-subtags/?lookup={lang}")
|
|
|
83 |
|
84 |
# ethnologue prefers T for german (deu), and T for French
|
85 |
st.write("## Older Codes")
|
86 |
+
|
|
|
87 |
st.write(f"ISO 639-3 'alpha3' code, 'terminology' variant (deprecated): {t_variant}")
|
88 |
st.write(f"ISO 639-3 'alpha3' code, 'bibliographic' variant (deprecated): {b_variant}")
|
89 |
st.write(f"If it exists, the ISO 639 Code Tables entry for the T variant would be at https://iso639-3.sil.org/code/{t_variant}")
|